| 16 | |
| 17 | [[BR]] |
| 18 | == Receiving IM == |
| 19 | |
| 20 | There are three ways to receive incoming instant messages (yes unfortunately it's not that straightforward), depending on how and who sends the instant message: |
| 21 | * if the IM was sent within call, then it will be received in [http://www.pjsip.org/python/pjsua.htm#CallCallback-on_pager on_pager()] method of [http://www.pjsip.org/python/pjsua.htm#CallCallback CallCallback object] |
| 22 | * if the IM was sent '''not''' within the call and the sender is in the our buddy list, then it will be received in [http://www.pjsip.org/python/pjsua.htm#BuddyCallback-on_pager on_pager()] method of [http://www.pjsip.org/python/pjsua.htm#BuddyCallback BuddyCallback] object. |
| 23 | * failing all that, the IM will be reported in [http://www.pjsip.org/python/pjsua.htm#AccountCallback-on_pager on_pager()] method of [http://www.pjsip.org/python/pjsua.htm#AccountCallback AccountCallback]. |
| 24 | |
| 25 | Incoming typing indications will be received in similar way, in ''on_typing()'' callback. |
| 26 | |
| 27 | |