Hello, Ok cool I will look at it, will it help with syntax issues I have seen with the double quotes so far?
Many thanks Jon Get Outlook for iOS<https://aka.ms/o0ukef> On Thu, Dec 1, 2016 at 12:31 PM +0000, "Daniel-Constantin Mierla" <mico...@gmail.com<mailto:mico...@gmail.com>> wrote: Hello, tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation. Cheers, Daniel On 01/12/2016 13:28, Jonathan Hunter wrote: Hello, I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case? Ok I will try with the combinations you mention. Many thanks Jon ________________________________ From: Daniel-Constantin Mierla <mico...@gmail.com><mailto:mico...@gmail.com> Sent: 01 December 2016 12:24 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO" Hello, are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start? When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes. Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter. Cheers, Daniel On 30/11/2016 15:38, Jonathan Hunter wrote: Hi, I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes. So in my kamailio.cfg script file I set the variable; $var(testjon8) = "p1=\"STOP\""; xlog("L_INFO","We are going to try and use $var(testjon8)\n"); And when seeing in the logs I see it states; We are going to try and use p1="STOP" And p1="STOP" is exactly what I want. However when I generate the SIP INFO message, and check on the wire using wireshark I see; Event:p1=STOP So it doesnt have the double quotes I would like. How can I escape them so the t_uac_dlg command includes them? The portion where this header is generated in the command is; exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \\\"From:'$var(testjon)'\"\\r\\nTo:$var(testjon2)\\r\\nCall-ID:$var(testjon3)\\r\\nAllow:$var(Allow)\\r\\nContact:$var(testjon4)\\r\\nEvent:$var(testjon8)\\r\\n\\\"\"", "$avp(test)"); And also running debug I see it as Event:p1="STOP"\r\n\"" Can you tell me how I can escape " so its actually within the SIP header itself? Many thanks Jon ________________________________ From: sr-users <sr-users-boun...@lists.sip-router.org><mailto:sr-users-boun...@lists.sip-router.org> on behalf of Jonathan Hunter <hunter...@hotmail.com><mailto:hunter...@hotmail.com> Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; mico...@gmail.com<mailto:mico...@gmail.com> Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO" Hi Daniel, Great thanks very much, will give it a try. Jon ________________________________ From: Daniel-Constantin Mierla <mico...@gmail.com><mailto:mico...@gmail.com> Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO" Hello, got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec. Can you give it a try? Some documentation can be found in the comments of the function used by this command: - https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399 Cheers, Daniel On 22/11/2016 18:35, Jonathan Hunter wrote: Hi Daniel, Thanks here you go; [root@POC_ProxyA kamailio]# 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>"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 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>"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " Thanks Jon Daniel-Constantin Mierla http://twitter.com/#!/miconda<http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com -- Daniel-Constantin Mierla twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com<http://www.kamailioworld.com> -- Daniel-Constantin Mierla www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com<http://www.kamailioworld.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