Hii
Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+341930203454@sub.domain.com;myid=+34@sub.domain.com SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.
$var(uri) = $sel(ruri); xavp_params_explode("$(var(uri){s.unbracket})", "uri"); xlog("L_INFO", "$var(uri) Received converted to $xavp(uri=>myid[0])\n");
I tried above and it prints +34@sub.domain.com But i want to just save +34 into a variable to further check the prefix based routing from the database.
1) Could you please help how to get it or If there is any alternate/single line approach to get this value? 2) $var & $xavp are process-local variables, and they cant be shared with other calls? Right 3) What is the best module to route calls based their prefix ? pstn_route or dynamic routing or any suggestions?
Please help, thanks in advance.
Hii
Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+341930203454@sub.domain.com;myid=+34@sub.domain.com SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.
$var(uri) = $sel(ruri); xavp_params_explode("$(var(uri){s.unbracket})", "uri"); xlog("L_INFO", "$var(uri) Received converted to $xavp(uri=>myid[0])\n");
I tried above and it prints +34@sub.domain.com But i want to just save +34 into a variable to further check the prefix based routing from the database.
1) Could you please help how to get it or If there is any alternate/single line approach to get this value? 2) $var & $xavp are process-local variables, and they cant be shared with other calls? Right 3) What is the best module to route calls based their prefix ? pstn_route or dynamic routing or any suggestions?
Please help, thanks in advance.
Hello,
have a look to the transformations for URIs: https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transforma... There is one to get parameters as well.
$shm variables are shared in shared memory, so you can share them in other calls. The $avp/$xavp are shared between processes, but belongs to the SIP transaction.
About routing calls by prefix – have a look to the lcr, carrierroute or drouting modules, for example.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of sai sudheer Sent: Tuesday, October 13, 2020 12:44 PM To: sr-users@lists.kamailio.org; sr-dev@lists.kamailio.org Subject: [SR-Users] how to get a value from SIP INVITE Header
Hii
Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+341930203454@sub.domain.commailto:341930203454@sub.domain.com;myid=+34@sub.domain.commailto:34@sub.domain.com SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.
$var(uri) = $sel(ruri); xavp_params_explode("$(var(uri){s.unbracket})", "uri"); xlog("L_INFO", "$var(uri) Received converted to $xavp(uri=>myid[0])\n");
I tried above and it prints +34@sub.domain.commailto:34@sub.domain.com But i want to just save +34 into a variable to further check the prefix based routing from the database.
1) Could you please help how to get it or If there is any alternate/single line approach to get this value? 2) $var & $xavp are process-local variables, and they cant be shared with other calls? Right 3) What is the best module to route calls based their prefix ? pstn_route or dynamic routing or any suggestions?
Please help, thanks in advance.
Hi.Thanks for your response. I went through the uri transformation page, tried it but no luck. Is there any other method to slice the string from +34xxxxxxxxx@sub.domain.com to +34?? Regards
Sent from Yahoo Mail on Android
On Tue, Oct 13, 2020 at 17:30, Henning Westerholthw@skalatan.de wrote: #yiv7346137936 #yiv7346137936 -- _filtered {} _filtered {}#yiv7346137936 #yiv7346137936 p.yiv7346137936MsoNormal, #yiv7346137936 li.yiv7346137936MsoNormal, #yiv7346137936 div.yiv7346137936MsoNormal {margin:0cm;font-size:11.0pt;font-family:sans-serif;}#yiv7346137936 a:link, #yiv7346137936 span.yiv7346137936MsoHyperlink {color:blue;text-decoration:underline;}#yiv7346137936 span.yiv7346137936E-MailFormatvorlage18 {font-family:sans-serif;color:windowtext;}#yiv7346137936 .yiv7346137936MsoChpDefault {font-family:sans-serif;} _filtered {}#yiv7346137936 div.yiv7346137936WordSection1 {}#yiv7346137936 Hello,
have a look to the transformations for URIs:https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transforma...
There is one to get parameters as well.
$shm variables are shared in shared memory, so you can share them in other calls. The $avp/$xavp are shared between processes, but belongs to the SIP transaction.
About routing calls by prefix – have a look to the lcr, carrierroute or drouting modules, for example.
Cheers,
Henning
Hello,
can you share the error you have got? If you just want to get the substring of the +34xxxxx@domain URI, have a look to the string transformations on the same link.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sai sudheer sudheer628@yahoo.com Sent: Tuesday, October 13, 2020 5:04 PM To: Henning Westerholt hw@skalatan.de; Henning Westerholt hw@skalatan.de; Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: RE: [SR-Users] how to get a value from SIP INVITE Header
Hi. Thanks for your response. I went through the uri transformation page, tried it but no luck.
Is there any other method to slice the string from +34xxxxxxxxx@sub.domain.commailto:+34xxxxxxxxx@sub.domain.com to +34??
Regards Sent from Yahoo Mail on Androidhttps://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature
On Tue, Oct 13, 2020 at 17:30, Henning Westerholt <hw@skalatan.demailto:hw@skalatan.de> wrote:
Hello,
have a look to the transformations for URIs: https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transforma...
There is one to get parameters as well.
$shm variables are shared in shared memory, so you can share them in other calls. The $avp/$xavp are shared between processes, but belongs to the SIP transaction.
About routing calls by prefix – have a look to the lcr, carrierroute or drouting modules, for example.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users <sr-users-bounces@lists.kamailio.orgmailto:sr-users-bounces@lists.kamailio.org> On Behalf Of sai sudheer Sent: Tuesday, October 13, 2020 12:44 PM To: sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org; sr-dev@lists.kamailio.orgmailto:sr-dev@lists.kamailio.org Subject: [SR-Users] how to get a value from SIP INVITE Header
Hii
Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+341930203454@sub.domain.commailto:341930203454@sub.domain.com;myid=+34@sub.domain.commailto:34@sub.domain.com SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.
$var(uri) = $sel(ruri);
xavp_params_explode("$(var(uri){s.unbracket})", "uri");
xlog("L_INFO", "$var(uri) Received converted to $xavp(uri=>myid[0])\n");
I tried above and it prints +34@sub.domain.commailto:34@sub.domain.com But i want to just save +34 into a variable to further check the prefix based routing from the database.
1) Could you please help how to get it or If there is any alternate/single line approach to get this value?
2) $var & $xavp are process-local variables, and they cant be shared with other calls? Right
3) What is the best module to route calls based their prefix ? pstn_route or dynamic routing or any suggestions?
Please help, thanks in advance.
Please help to configure uri transformation page.
Thanks Santanu
On Wed, Oct 14, 2020 at 1:08 PM Henning Westerholt hw@skalatan.de wrote:
Hello,
can you share the error you have got? If you just want to get the substring of the +34xxxxx@domain URI, have a look to the string transformations on the same link.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* sai sudheer sudheer628@yahoo.com *Sent:* Tuesday, October 13, 2020 5:04 PM *To:* Henning Westerholt hw@skalatan.de; Henning Westerholt < hw@skalatan.de>; Kamailio (SER) - Users Mailing List < sr-users@lists.kamailio.org> *Subject:* RE: [SR-Users] how to get a value from SIP INVITE Header
Hi.
Thanks for your response. I went through the uri transformation page, tried it but no luck.
Is there any other method to slice the string from +34xxxxxxxxx@sub.domain.com to +34??
Regards
Sent from Yahoo Mail on Android https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature
On Tue, Oct 13, 2020 at 17:30, Henning Westerholt
hw@skalatan.de wrote:
Hello,
have a look to the transformations for URIs: https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transforma...
There is one to get parameters as well.
$shm variables are shared in shared memory, so you can share them in other calls. The $avp/$xavp are shared between processes, but belongs to the SIP transaction.
About routing calls by prefix – have a look to the lcr, carrierroute or drouting modules, for example.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* sr-users sr-users-bounces@lists.kamailio.org *On Behalf Of *sai sudheer *Sent:* Tuesday, October 13, 2020 12:44 PM *To:* sr-users@lists.kamailio.org; sr-dev@lists.kamailio.org *Subject:* [SR-Users] how to get a value from SIP INVITE Header
Hii
Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+341930203454@sub.domain.com;myid=+ 34@sub.domain.com SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.
$var(uri) = $sel(ruri); xavp_params_explode("$(var(uri){s.unbracket})", "uri"); xlog("L_INFO", "$var(uri) Received converted to
$xavp(uri=>myid[0])\n");
I tried above and it prints +34@sub.domain.com But i want to just save +34 into a variable to further check the prefix based routing from the database.
- Could you please help how to get it or If there is any alternate/single
line approach to get this value?
- $var & $xavp are process-local variables, and they cant be shared with
other calls? Right
- What is the best module to route calls based their prefix ? pstn_route
or dynamic routing or any suggestions?
Please help, thanks in advance.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
hii,, I tried {uri.user} from the URI transformations. but i just get 0 or Null in the log.
Now i tried the string transformation as per your reply, and {s.select,index,separator} is thing i was expecting .. It worked now, and i am getting +34xxx alone, which is what i need.
Thanks a lot.
On Wednesday, October 14, 2020, 08:36:37 AM GMT+1, Henning Westerholt hw@skalatan.de wrote:
Hello,
can you share the error you have got? If you just want to get the substring of the +34xxxxx@domain URI, have a look to the string transformations on the same link.
Cheers,
Henning
I have tried to configure SIP through SIREMIS. Could you please share some documents for this. I want y SIP endpoint to join in the Jitsi Conference room. Please guide me.
Thanks and regards, Santanu
On Tue, Oct 13, 2020 at 5:31 PM Henning Westerholt hw@skalatan.de wrote:
Hello,
have a look to the transformations for URIs: https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transforma...
There is one to get parameters as well.
$shm variables are shared in shared memory, so you can share them in other calls. The $avp/$xavp are shared between processes, but belongs to the SIP transaction.
About routing calls by prefix – have a look to the lcr, carrierroute or drouting modules, for example.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* sr-users sr-users-bounces@lists.kamailio.org *On Behalf Of *sai sudheer *Sent:* Tuesday, October 13, 2020 12:44 PM *To:* sr-users@lists.kamailio.org; sr-dev@lists.kamailio.org *Subject:* [SR-Users] how to get a value from SIP INVITE Header
Hii
Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+341930203454@sub.domain.com;myid=+ 34@sub.domain.com SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.
$var(uri) = $sel(ruri); xavp_params_explode("$(var(uri){s.unbracket})", "uri"); xlog("L_INFO", "$var(uri) Received converted to
$xavp(uri=>myid[0])\n");
I tried above and it prints +34@sub.domain.com But i want to just save +34 into a variable to further check the prefix based routing from the database.
- Could you please help how to get it or If there is any alternate/single
line approach to get this value?
- $var & $xavp are process-local variables, and they cant be shared with
other calls? Right
- What is the best module to route calls based their prefix ? pstn_route
or dynamic routing or any suggestions?
Please help, thanks in advance.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users