[OpenSIPS-Users] Send a SIP Notify message to a registered SIP Phone (config resync)

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Feb 13 10:59:58 CET 2013


Hi Ali,

Per fifo syntax (see 
http://www.opensips.org/html/docs/modules/1.9.x/mi_fifo.html#id247980), 
if one of the parameter contains \n or \r (which is fifo param 
separator), you need to escape the whole string between "" . So try :

opensipsctl fifo t_uac_dlg NOTIFY sip:sip.ali at sip.domain.com 
sip:sip.ali at 10.10.10.10 . 
'\"From:<sip:sip.ali at sip.domain.com>;tag=2e6d0428dde36eaa\r\nTo:<sip:sip.ali at sip.domain.com>\r\nCseq: 
1243 NOTIFY\r\nCall-ID: 5957934579359\r\nEvent: resync\r\n\"'

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 02/12/2013 06:28 PM, Ali Pey wrote:
> Hello,
>
> I cannot get t_uac_dlg to work. It keeps telling me 400 Too few or too 
> many arguments. My server is running opensips version 1.6.3 and this 
> is how I am  doing it:
>
> opensipsctl fifo t_uac_dlg NOTIFY sip:sip.ali at sip.domain.com 
> <mailto:sip%3Asip.ali at sip.domain.com> sip:sip.ali at 10.10.10.10 
> <mailto:sip%3Asip.ali at 10.10.10.10> . "From:<sip:sip.ali at sip.domain.com 
> <mailto:sip%3Asip.ali at sip.domain.com>>;tag=2e6d0428dde36eaa\r\nTo:<sip:sip.ali at sip.domain.com 
> <mailto:sip%3Asip.ali at sip.domain.com>>\r\nCseq: 1243 
> NOTIFY\r\nCall-ID: 5957934579359\r\nEvent: resync\r\n"
> 400 Too few or too many arguments
>
> This is how it looks in the log file:
>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <NOTIFY>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val 
> <sip:sip.ali at sip.domain.com <mailto:sip%3Asip.ali at sip.domain.com>>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val 
> <sip:sip.ali at 10.10.10.10 <mailto:sip%3Asip.ali at 10.10.10.10>>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <.>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val 
> <From:<sip:sip.ali at sip.domain.com 
> <mailto:sip%3Asip.ali at sip.domain.com>>;tag=2e6d0428dde36eaa>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val 
> <To:<sip:sip.ali at sip.domain.com <mailto:sip%3Asip.ali at sip.domain.com>>>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <Cseq: 1243 NOTIFY>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <Call-ID: 5957934579359>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <Event: resync>
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_parse_node: end of input tree
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_fifo_server: done parsing the mi tree
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_fifo_server: command empty
> Feb 12 11:20:37 opensips-1 /usr/sbin/opensips[3409]: 
> DBG:mi_fifo:mi_fifo_server: entered consume
>
>
> Can someone shed some light here for me? I have tried any possible 
> combination I could think of.
>
> Thanks,
> Ali
>
>
> On Sat, Jan 26, 2013 at 2:46 AM, Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Hi Ali,
>
>      See the TM docs.
>
>     Regards,
>     Bogdan
>
>
>     Sent from Samsung Mobile
>
>
>
>     -------- Original message --------
>     From: Ali Pey <alipey at gmail.com <mailto:alipey at gmail.com>>
>     Date:
>     To: Bogdan-Andrei Iancu <bogdan at opensips.org
>     <mailto:bogdan at opensips.org>>
>     Subject: Re: [OpenSIPS-Users] Send a SIP Notify message to a
>     registered SIP Phone (config resync)
>
>
>     Thank you for the quick response Bogdan.
>
>     Is there an example of how to use this command somewhere? I can't
>     get it to work.
>
>     Regards,
>     Ali Pey
>
>
>
>     On Fri, Jan 25, 2013 at 12:14 PM, Bogdan-Andrei Iancu
>     <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>         Hi Ali,
>
>         Use the t_uac_dlg MI command to do it.
>
>         Best regards,
>         Bogdan
>
>
>         Sent from Samsung Mobile
>
>
>
>         -------- Original message --------
>         From: Ali Pey <alipey at gmail.com <mailto:alipey at gmail.com>>
>         Date:
>         To: OpenSIPS users mailling list <users at lists.opensips.org
>         <mailto:users at lists.opensips.org>>
>         Subject: [OpenSIPS-Users] Send a SIP Notify message to a
>         registered SIP Phone (config resync)
>
>
>         Hello,
>
>         What's the best way to generate and send a custom Notify SIP
>         message to a registered sip phone (for configuration resync)?
>
>         Thanks,
>         Ali Pey
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130213/9e82756f/attachment-0001.htm>


More information about the Users mailing list