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 <miconda@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-bounces@lists.sip-router.org> on behalf of Jonathan Hunter <hunterj91@hotmail.com>
Sent: 25 November 2016 18:55
To: Kamailio SER - Users Mailing List; miconda@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 <miconda@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\""
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\""
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
"
404 Invalid local socket
FIFO command was:
:t_uac_dlg:kamailio_receiver_23469
INFO
.
"


Thanks


Jon

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

-- 
Daniel-Constantin Mierla
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com