Checking received NOTIFY requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Any help please...

On Tue, Dec 23, 2008 at 8:34 AM, John Poseidon
<jposeidon.system at gmail.com>wrote:

>
> Hi,
>
> I will try to be more precise in this message,
>
>
>
>  Here is my problem :
>
> Like I have mentioned in my last email, I want to implement a Message
> Waiting functions.
>
> So the server send me a Notify request to inform me that I have (or don't
> have) a voice-mail(s)
>
> ( Message-Waiting:Yes/No )
>
>
>  Here Is a part of the received sip request :
>
>
> *Content-Type: application/simple-message-summary
> Content-Length: 65
>
> Messages-Waiting: no
> Message-Account: sip:1016 at ..... *
>
>
>
>
>  I need to have a function Ex. on_message_waiting_callback().
>
> If it's not possible to have it, one function on_request_received
> callback() can also help me.
>
> In this case I will parse the received request to check if there is a
> Message-Waiting parameter in it.
>
>
>  Like you have mentioned in your email when the server send a presence
> information for some buddy it can be catch by implementing on_buddy_state
> callback function.
>
>
>  My problem is : How to catch a SIP requests having a message waiting
> information in it.
>
>  My server notify me if I have a new voice-mail(s) or not by sending a SIP
> Notify request, I need to check it and verify If the message-waiting
> parameter is present and is YES or NO.
>
>  I hope that I'm more clear now.
>
>
>  Thanks a lot.
>
>
>  Cheers
>
> On Tue, Dec 23, 2008 at 2:04 AM, Joseph Maiquez <josephmaiquez at yahoo.com>wrote:
>
>>  If the user which you invite accpet your presence subscription, It will
>> automatically send the presence information and you can catch it by
>> inplementing the on_buddy_state callback..
>>
>> You don't need to create anything..
>>
>> To subscribe for presence, just call pjsua_subscribe_pres
>> To send chat message use pjsua_im_send
>>
>> The program will automatically generate the request
>>
>> But if you want other thing be done, please be specific
>>
>> site an example of what you want to do..
>>
>> --- On *Mon, 12/22/08, John Poseidon <jposeidon.system at gmail.com>* wrote:
>>
>> From: John Poseidon <jposeidon.system@xxxxxxxxx>
>> Subject: Re: Checking received NOTIFY requests
>> To: josephmaiquez at yahoo.com, "pjsip list" <pjsip at lists.pjsip.org>
>> Date: Monday, December 22, 2008, 5:22 AM
>>
>>
>> Hi,
>>
>> Thanks for your answer,
>>
>> I want to implement a message waiting function, so I need to check the
>> received notify requests to see if the Message-Waiting is Yes or No?
>> Please tell me if I'm wrong.
>>
>>
>>
>> ....................................................................................
>> Here is what I see in my console :
>>
>> ....................................................................................
>> NOTIFY sip:1016 at ...:5067;transport=UDP SIP/2.0
>> Via: SIP/2.0/UDP .... ;rport;branch=z9hG4bK8vgjrmv7H387S
>> Max-Forwards: 70
>> From: <sip:1016@....>;tag=SaUQXQ1aKS4Fr
>> To: <sip:1016 at .....>
>> Call-ID: c12b0e28-4aaf-122c-b09e-001e68aa270f
>> CSeq: 108851152 NOTIFY
>> Contact: <sip:mod_sofia at ...:5060>
>> User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-10876M
>> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
>> NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH
>> Supported: timer, precondition, path, replaces
>> Event: message-summary
>> Allow-Events: talk, presence, dialog, call-info, sla,
>> include-session-description, presence.winfo, message-summary, refer
>> Subscription-State: terminated;timeout
>> Content-Type: application/simple-message-summary
>> Content-Length: 65
>>
>> Messages-Waiting: no
>> Message-Account: sip:1016 at .....
>>
>> ....................................................................................
>>
>>
>>
>> Cheers.
>>
>> On Mon, Dec 22, 2008 at 11:12 AM, Joseph Maiquez <josephmaiquez at yahoo.com
>> > wrote:
>>
>>>   what request doi you want to catch?
>>>
>>> if you want to catch the other user's invite use on_incoming_subscribe
>>> if you want to catch the status (e.g. 200 OK, REQUEST TIMED OUT) of a
>>> particular request say sending message, for you to know if the other user
>>> received this user on_pager_status call back
>>>
>>> --- On *Mon, 12/22/08, John Poseidon <jposeidon.system at gmail.com>*wrote:
>>>
>>> From: John Poseidon <jposeidon.system@xxxxxxxxx>
>>> Subject: Checking received NOTIFY requests
>>> To: pjsip at lists.pjsip.org
>>> Date: Monday, December 22, 2008, 3:57 AM
>>>
>>>  Hi all,
>>>
>>>
>>
>> I want to check the received NOTIFY requests, can someone tall me how to
>> do that?
>>
>>  I can't find it here :
>> http://www.pjsip.org/pjsip/docs/html/structpjsua__callback.htm
>>
>>
>>   is there any function for that ex. on_request_received?
>>
>>
>> Thanks
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing listpjsip at lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20081223/cb4b4a16/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux