Hello,

One last question relating to this issue of sending SIP INFO within a dialog. 
(Sorry!)


As you know I now have t_uac_dlg working with the exec module to create the SIP 
INFO, however how do I inject it effectively within the dialog?


I have added event_route[dialog:start] as thought this would be a good point to 
send prior to the ACK and just checking I get all the tags for the dialog, 
however it doesnt seem to capture the to_tag when its hit, am I missing 
something in config here or am I calling in in wrong place?



event_route[dialog:start]
{
xlog("L_INFO", "We are getting here in event route\n")
xlog("L_INFO","We have here $dlg(to_uri) and $dlg(from_uri)\n");
xlog("L_INFO","to uri is $dlg(to_uri)\n");
xlog("L_INFO","to tag is $dlg(to_tag)\n");
xlog("L_INFO","from uri is $dlg(from_uri)\n");
xlog("L_INFO","from tag is $dlg(from_tag)\n");
xlog("L_INFO","callid is $dlg(callid)\n");



Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: We are 
getting here in event route
Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: We have 
here sip:782607917190438@4.4.4.4:5060 and sip:01162292700@8.8.8.8:5080
Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: to uri is 
sip:782607917190438@4.4.4.4:5060
Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: to tag is 
<null>
Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: from uri 
is sip:01162292700@8.8.8.8:5080
Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: from tag 
is as5a4ffcca

As when I do kamctl mi dlg_list I see the totag listed;


[root@POC_ProxyA kamailio]# kamctl mi dlg_list
dialog::  hash=24:6960

        from_uri:: sip:01162292700@8.8.8.8:5080
        from_tag:: as5a4ffcca

        to_uri:: sip:782607917190438@4.4.4.4:5060
        to_tag:: 3688793392-940006

Sorry again for another question on this theme but I feel I am 90% there thanks 
to your help.


Also Is it possible to fire the exec command after the completion of the 
200ok/ACK exchange ?


Many thanks


Jon


________________________________
From: sr-users <sr-users-boun...@lists.sip-router.org> on behalf of Jonathan 
Hunter <hunter...@hotmail.com>
Sent: 21 November 2016 17:38
To: Kamailio SER - Users Mailing List; mico...@gmail.com
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,


Thanks Daniel, knowing how I should specify all the parameters would be great, 
just a syntax example, in particular when defining all the sip headers and why 
their are double quotes/single quotes or what best method is.


Thanks again and sorry for the noise!


Jon





something seems to be strange with interpreting the parameters from command 
line and forwarding them to kamailio. I will dig a bit into kamctl and come 
back with some hints.


Cheers,
Daniel

On 21/11/16 13:19, Jonathan Hunter wrote:

Hello.


This is running from command line, not withing the configuration file, so I am 
testing before I try to add it in.


I have tried with single quotes, but not sure how to enclose the SIP headers 
and the r/n , can you please advise?


kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060    
\"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\""



As I have tried;


kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060'  
  
'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n\'


And still get invalid socket, as it is including all the SIP headers in with 
the port parameter so I presume I am missing an operator?


/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too 
many colons in 
udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'



Its including them all as the local socket/port.

Thanks

Jon

________________________________
From: Daniel-Constantin Mierla <mico...@gmail.com><mailto:mico...@gmail.com>
Sent: 21 November 2016 11:29
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,

On 20/11/16 16:12, Jonathan Hunter wrote:

Hello,


Ok great thanks Daniel.


One final thing, I cant seem to get kamilio to except the parameter when I add 
the socket parameter in the kamctl mi t_uac_dlg command.


If I add as below I get 404 invalid local socket;

 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060    
\"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""

do you run this command from command line or from kamailio.cfg? I think it's 
good to be sure it works from command line.

Also, can you try to enclose each parameter in single quotes -- then it's 
easier for the command line parser to identify the parameters.

Cheers,
Daniel

404 Invalid local socket

As its picking up the socket with the from address included as well, is this 
again around syntax?

ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in 
udp:10.70.1.136:5060"From:sip:1234@8.8.8.8

As it seems to pick socket up ok;

Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo 
[mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO>
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo 
[mi_parser.c:245]: mi_parse_tree(): adding node <> ; val 
<sip:3003@193.144.1.112><sip:3003@193.144.1.112>
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo 
[mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.>
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo 
[mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <udp:10.70.1.136:5060>
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo 
[mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo 
[mi_parser.c:84]: mi_parse_node(): end of fifo input tree
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo 
[fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> 
[main.c:1128]: parse_phostport(): too many colons in 
udp:10.70.1.136:5060"From:sip:1234@8.8.8.8




--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to