[SR-Users] How to get the dispatcher value dynamically

2019-10-18 Thread Narayan P
Hello,

We are using kamailio for load balancing  as stateless proxy as mentioned below.

{$du = "sip:192.168.130.XXX;transport=udp";
forward();}

We have set $du to the correct media server value in the dispatcher module.Can 
you please tell me how to
get the correct dispatcher value(Media server IP) and print this into log file.

I am using $ru and $du to print,but it is not giving the correct one.
for example: Suppose for the first call ;

$du = "sip:192.168.130.XXX:5060;transport=udp";
$du = "sip:192.168.130.XXX:5062;transport=udp";
and so on.
How to fetch the correct dispatcher value dynamically.

Any response will be highly appreciated.


Thanks,
Rudra
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] rtpengine not listening on specified port range

2019-02-11 Thread Narayan P
Thank you Iman.

It is working now.

Thanks,
Narayan

From: sr-users  on behalf of Iman 
Mohammadi 
Sent: Monday, February 11, 2019 7:52 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] rtpengine not listening on specified port range

Hi

You can set your params in rtpengine.conf and run it as "rtpengine 
--config-file /directory/rtpengine.conf", you can find rtpengine.conf.sample at 
/your rtpengine directory/etc/


On Mon, Feb 11, 2019 at 10:56 AM Narayan P 
mailto:narayan...@outlook.com>> wrote:
Hello,

I am starting the rtpengine through this command,but rtpengine is not listening 
on the specified port range.It is listening on some other port outside of 
this.Here first IP is private IP and the second IP is public one.So issue is 
with audio.Can you please let me know what exactly I am missing.

rtpengine --interface=172.20.xx.xxx\!34.209.1.xx -f -m 16384 -M 16884 -E 
--listen-ng=127.0.0.1:2<http://127.0.0.1:2> &

Any suggestion will be highly appreciated.


Thanks,
Narayan
NP


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] rtpengine not listening on specified port range

2019-02-10 Thread Narayan P
Hello,

I am starting the rtpengine through this command,but rtpengine is not listening 
on the specified port range.It is listening on some other port outside of 
this.Here first IP is private IP and the second IP is public one.So issue is 
with audio.Can you please let me know what exactly I am missing.

rtpengine --interface=172.20.xx.xxx\!34.209.1.xx -f -m 16384 -M 16884 -E 
--listen-ng=127.0.0.1:2 &

Any suggestion will be highly appreciated.


Thanks,
Narayan
NP


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] rtpengine not listening on specified port range

2019-02-10 Thread Narayan P
Hello,

I am starting the rtpengine through this command,but rtpengine is not listening 
on the specified port range.It is listening on some other port outside of 
this.Here first IP is private IP and the second IP is public one.So issue is 
with audio.Can you please let me know what exactly I am missing.

rtpengine --interface=172.20.xx.xxx\!34.209.1.xx -f -m 16384 -M 16884 -E 
--listen-ng=127.0.0.1:2 &

Any suggestion will be highly appreciated.


Thanks,
Narayan

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issue in cdr generation in seconds format

2018-04-05 Thread Narayan P
Hello,


Can I have an update on this please.


Thanks,



From: Narayan P
Sent: Tuesday, March 20, 2018 6:49:37 AM
To: Henning Westerholt; sr-users@lists.kamailio.org
Subject: Re: [SR-Users] Issue in cdr generation in seconds format


Hello Henning,


Thanks for replying.

I have already tried with time_mode = 1.I have used this like;

modparam("acc", "time_mode", 1) and also

modparam("acc", "time_mode", 0)

Can you please suggest any other settings that I need to do in kamailio.

Thanks,
Narayan



From: Henning Westerholt <h...@kamailio.org>
Sent: Monday, March 19, 2018 8:33:54 PM
To: sr-users@lists.kamailio.org
Cc: Narayan P
Subject: Re: [SR-Users] Issue in cdr generation in seconds format

Am Montag, 19. März 2018, 13:49:52 CET schrieb Narayan P:
> Any update on this please.
>

Hello Naryan,

have you tried with time_mode = 1?

6.45. time_mode (int)

   Store additional value related to the time of event.

   Values can be:
 * 0 - (default), save only unix timestamp for syslog and datetime for
   database.
 * 1 - save seconds in time_attr and microseconds in time_exten.

Best regards,

Henning




> Hello Sir,
>
>
> I need your expertise for kamailio cdr generation in seconds format.
>
>
> I have a requirement to generate cdr duration in second format.Now I am
> getting second.milliseconds format.Below is the log where duration is
> 18.676 but I want this to be 19.(suppose where duration =18.234, I need it
> to be 18).
>
>
> Mar 16 10:38:22 vm11-kamailio /usr/local/sbin/kamailio[20787]: NOTICE: acc
> [acc_cdr.c:352]: log_write_cdr(): start_time=1521196683.464;
> end_time=1521196702.140; duration=18.676; src_user=71097345;
> src_domain=185.122.XXX.XXX; src_ip=185.122.XXX.XXX; dst_user=;
> dst_ouser=91786042; dst_domain=185.122.XXX.XXX; sip_code=; sip_reason=;
> callid=LVHyTCFWYBpEFp.sFpY204aBdx.nez9B; dst_ip=185.122.XXX.XXX
>
>
>
> My kamailio configuration related to cdr is like this;
>
> /* what special events should be accounted ? */
> modparam("acc", "db_url", "flatstore:/var/log/cdr.log")
> #modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)")
> modparam("acc", "log_facility", "LOG_DAEMON")
> modparam("acc", "cdr_enable", 1)
> modparam("acc", "cdr_start_on_confirmed", 1)
> modparam("acc", "cdr_log_enable", 1)
> modparam("acc", "time_mode", 0)
> modparam("acc", "time_attr", "seconds")
> modparam("acc", "cdr_start_id", "start_time")
> modparam("acc", "cdr_end_id", "end_time")
> modparam("acc", "cdr_duration_id", "duration")
> #modparam("acc", "cdr_flag", 3)
> #modparam("acc", "early_media", 0)
> #modparam("acc", "report_ack", 0)
> #modparam("acc", "report_cancels", 0)
> #modparam("dialog", "enable_stats", 1)
> modparam("dialog", "hash_size", 1024)
> modparam("dialog", "dlg_flag", 3)
> modparam("dialog", "db_url", DBURL)
>
> /* by default ww do not adjust the direct of the sequential requests.
>  * if you enable this parameter, be sure the enable "append_fromtag"
>  * in "rr" module */
> modparam("acc", "detect_direction", 0)
> /* account triggers (flags) */
> #modparam("acc", "log_flag", FLT_ACC)
> #modparam("acc", "log_missed_flag", FLT_ACCMISSED)
> #modparam("acc", "log_extra",
> #   "src_user=$fU;src_domain=$fd;src_ip=$si;"
> #   "dst_user=$tU;dst_user=$rU;dst_domain=$rd")
> modparam("acc",
>
> "cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=
> $tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$R
> i")
>
> Please suggest me what to configure more in kamailio to achieve cdr in
> second format.
>
> Thanks,
> Narayan


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issue in cdr generation in seconds format

2018-03-20 Thread Narayan P
Hello Henning,


Thanks for replying.

I have already tried with time_mode = 1.I have used this like;

modparam("acc", "time_mode", 1) and also

modparam("acc", "time_mode", 0)

Can you please suggest any other settings that I need to do in kamailio.

Thanks,
Narayan



From: Henning Westerholt <h...@kamailio.org>
Sent: Monday, March 19, 2018 8:33:54 PM
To: sr-users@lists.kamailio.org
Cc: Narayan P
Subject: Re: [SR-Users] Issue in cdr generation in seconds format

Am Montag, 19. März 2018, 13:49:52 CET schrieb Narayan P:
> Any update on this please.
>

Hello Naryan,

have you tried with time_mode = 1?

6.45. time_mode (int)

   Store additional value related to the time of event.

   Values can be:
 * 0 - (default), save only unix timestamp for syslog and datetime for
   database.
 * 1 - save seconds in time_attr and microseconds in time_exten.

Best regards,

Henning




> Hello Sir,
>
>
> I need your expertise for kamailio cdr generation in seconds format.
>
>
> I have a requirement to generate cdr duration in second format.Now I am
> getting second.milliseconds format.Below is the log where duration is
> 18.676 but I want this to be 19.(suppose where duration =18.234, I need it
> to be 18).
>
>
> Mar 16 10:38:22 vm11-kamailio /usr/local/sbin/kamailio[20787]: NOTICE: acc
> [acc_cdr.c:352]: log_write_cdr(): start_time=1521196683.464;
> end_time=1521196702.140; duration=18.676; src_user=71097345;
> src_domain=185.122.XXX.XXX; src_ip=185.122.XXX.XXX; dst_user=;
> dst_ouser=91786042; dst_domain=185.122.XXX.XXX; sip_code=; sip_reason=;
> callid=LVHyTCFWYBpEFp.sFpY204aBdx.nez9B; dst_ip=185.122.XXX.XXX
>
>
>
> My kamailio configuration related to cdr is like this;
>
> /* what special events should be accounted ? */
> modparam("acc", "db_url", "flatstore:/var/log/cdr.log")
> #modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)")
> modparam("acc", "log_facility", "LOG_DAEMON")
> modparam("acc", "cdr_enable", 1)
> modparam("acc", "cdr_start_on_confirmed", 1)
> modparam("acc", "cdr_log_enable", 1)
> modparam("acc", "time_mode", 0)
> modparam("acc", "time_attr", "seconds")
> modparam("acc", "cdr_start_id", "start_time")
> modparam("acc", "cdr_end_id", "end_time")
> modparam("acc", "cdr_duration_id", "duration")
> #modparam("acc", "cdr_flag", 3)
> #modparam("acc", "early_media", 0)
> #modparam("acc", "report_ack", 0)
> #modparam("acc", "report_cancels", 0)
> #modparam("dialog", "enable_stats", 1)
> modparam("dialog", "hash_size", 1024)
> modparam("dialog", "dlg_flag", 3)
> modparam("dialog", "db_url", DBURL)
>
> /* by default ww do not adjust the direct of the sequential requests.
>  * if you enable this parameter, be sure the enable "append_fromtag"
>  * in "rr" module */
> modparam("acc", "detect_direction", 0)
> /* account triggers (flags) */
> #modparam("acc", "log_flag", FLT_ACC)
> #modparam("acc", "log_missed_flag", FLT_ACCMISSED)
> #modparam("acc", "log_extra",
> #   "src_user=$fU;src_domain=$fd;src_ip=$si;"
> #   "dst_user=$tU;dst_user=$rU;dst_domain=$rd")
> modparam("acc",
>
> "cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=
> $tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$R
> i")
>
> Please suggest me what to configure more in kamailio to achieve cdr in
> second format.
>
> Thanks,
> Narayan


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issue in cdr generation in seconds format

2018-03-19 Thread Narayan P
Hello All,


Any update on this please.


Thanks,

Narayan






From: sr-users <sr-users-boun...@lists.kamailio.org> on behalf of Narayan P 
<narayan...@outlook.com>
Sent: Friday, March 16, 2018 11:02:19 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] Issue in cdr generation in seconds format


Hello Sir,


I need your expertise for kamailio cdr generation in seconds format.


I have a requirement to generate cdr duration in second format.Now I am getting 
second.milliseconds format.Below is the log where duration is 18.676 but I want 
this to be 19.(suppose where duration =18.234, I need it to be 18).


Mar 16 10:38:22 vm11-kamailio /usr/local/sbin/kamailio[20787]: NOTICE: acc 
[acc_cdr.c:352]: log_write_cdr(): start_time=1521196683.464; 
end_time=1521196702.140; duration=18.676; src_user=71097345; 
src_domain=185.122.XXX.XXX; src_ip=185.122.XXX.XXX; dst_user=; 
dst_ouser=91786042; dst_domain=185.122.XXX.XXX; sip_code=; sip_reason=; 
callid=LVHyTCFWYBpEFp.sFpY204aBdx.nez9B; dst_ip=185.122.XXX.XXX



My kamailio configuration related to cdr is like this;

/* what special events should be accounted ? */
modparam("acc", "db_url", "flatstore:/var/log/cdr.log")
#modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)")
modparam("acc", "log_facility", "LOG_DAEMON")
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdr_start_on_confirmed", 1)
modparam("acc", "cdr_log_enable", 1)
modparam("acc", "time_mode", 0)
modparam("acc", "time_attr", "seconds")
modparam("acc", "cdr_start_id", "start_time")
modparam("acc", "cdr_end_id", "end_time")
modparam("acc", "cdr_duration_id", "duration")
#modparam("acc", "cdr_flag", 3)
#modparam("acc", "early_media", 0)
#modparam("acc", "report_ack", 0)
#modparam("acc", "report_cancels", 0)
#modparam("dialog", "enable_stats", 1)
modparam("dialog", "hash_size", 1024)
modparam("dialog", "dlg_flag", 3)
modparam("dialog", "db_url", DBURL)

/* by default ww do not adjust the direct of the sequential requests.
 * if you enable this parameter, be sure the enable "append_fromtag"
 * in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
#modparam("acc", "log_flag", FLT_ACC)
#modparam("acc", "log_missed_flag", FLT_ACCMISSED)
#modparam("acc", "log_extra",
#   "src_user=$fU;src_domain=$fd;src_ip=$si;"
#   "dst_user=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc",

"cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")

Please suggest me what to configure more in kamailio to achieve cdr in second 
format.

Thanks,
Narayan

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Issue in cdr generation in seconds format

2018-03-16 Thread Narayan P
Hello Sir,


I need your expertise for kamailio cdr generation in seconds format.


I have a requirement to generate cdr duration in second format.Now I am getting 
second.milliseconds format.Below is the log where duration is 18.676 but I want 
this to be 19.(suppose where duration =18.234, I need it to be 18).


Mar 16 10:38:22 vm11-kamailio /usr/local/sbin/kamailio[20787]: NOTICE: acc 
[acc_cdr.c:352]: log_write_cdr(): start_time=1521196683.464; 
end_time=1521196702.140; duration=18.676; src_user=71097345; 
src_domain=185.122.XXX.XXX; src_ip=185.122.XXX.XXX; dst_user=; 
dst_ouser=91786042; dst_domain=185.122.XXX.XXX; sip_code=; sip_reason=; 
callid=LVHyTCFWYBpEFp.sFpY204aBdx.nez9B; dst_ip=185.122.XXX.XXX



My kamailio configuration related to cdr is like this;

/* what special events should be accounted ? */
modparam("acc", "db_url", "flatstore:/var/log/cdr.log")
#modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)")
modparam("acc", "log_facility", "LOG_DAEMON")
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdr_start_on_confirmed", 1)
modparam("acc", "cdr_log_enable", 1)
modparam("acc", "time_mode", 0)
modparam("acc", "time_attr", "seconds")
modparam("acc", "cdr_start_id", "start_time")
modparam("acc", "cdr_end_id", "end_time")
modparam("acc", "cdr_duration_id", "duration")
#modparam("acc", "cdr_flag", 3)
#modparam("acc", "early_media", 0)
#modparam("acc", "report_ack", 0)
#modparam("acc", "report_cancels", 0)
#modparam("dialog", "enable_stats", 1)
modparam("dialog", "hash_size", 1024)
modparam("dialog", "dlg_flag", 3)
modparam("dialog", "db_url", DBURL)

/* by default ww do not adjust the direct of the sequential requests.
 * if you enable this parameter, be sure the enable "append_fromtag"
 * in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
#modparam("acc", "log_flag", FLT_ACC)
#modparam("acc", "log_missed_flag", FLT_ACCMISSED)
#modparam("acc", "log_extra",
#   "src_user=$fU;src_domain=$fd;src_ip=$si;"
#   "dst_user=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc",

"cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")

Please suggest me what to configure more in kamailio to achieve cdr in second 
format.

Thanks,
Narayan

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] how to add new media server in dispatcher table through "ANSIBLE"

2017-11-28 Thread Narayan P
Hello Joel,

I am using mysql database.

Thanks,
Narayan



From: Narayan P
Sent: Wednesday, November 29, 2017 6:31:46 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] how to add new media server in dispatcher table through 
"ANSIBLE"


Hello Joel,


I am using mysql database.


Thanks,

Narayan


From: sr-users <sr-users-boun...@lists.kamailio.org> on behalf of Joel Serrano 
<j...@gogii.net>
Sent: Wednesday, November 29, 2017 3:14:35 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] how to add new media server in dispatcher table through 
"ANSIBLE"

What backend database are you using for Kamailio?



On Tue, Nov 28, 2017 at 11:32 AM, Narayan P <narayan...@outlook.com> wrote:
> Hello Experts,
>
>
> I am new to ansible and deploying kamailio through ansible.Sucessfully
> deployed kamailio but my requirement is to add media server through
> ansible.As I am using dispatcher module in kamailio,not able to find any
> script that directly insert one media server IP and port into dispatcher
> table from ansible.(I am using ansible in one system and deploying kamailio
> in other).
>
>
>
>
> Any suggestion will be highly appreciated as always.
>
>
>
> Thanks,
>
> Narayan
>
> +91-9035438928
>
>
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] how to add new media server in dispatcher table through "ANSIBLE"

2017-11-28 Thread Narayan P
Hello Joel,


I am using mysql database.


Thanks,

Narayan


From: sr-users <sr-users-boun...@lists.kamailio.org> on behalf of Joel Serrano 
<j...@gogii.net>
Sent: Wednesday, November 29, 2017 3:14:35 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] how to add new media server in dispatcher table through 
"ANSIBLE"

What backend database are you using for Kamailio?



On Tue, Nov 28, 2017 at 11:32 AM, Narayan P <narayan...@outlook.com> wrote:
> Hello Experts,
>
>
> I am new to ansible and deploying kamailio through ansible.Sucessfully
> deployed kamailio but my requirement is to add media server through
> ansible.As I am using dispatcher module in kamailio,not able to find any
> script that directly insert one media server IP and port into dispatcher
> table from ansible.(I am using ansible in one system and deploying kamailio
> in other).
>
>
>
>
> Any suggestion will be highly appreciated as always.
>
>
>
> Thanks,
>
> Narayan
>
> +91-9035438928
>
>
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] how to add new media server in dispatcher table through "ANSIBLE"

2017-11-28 Thread Narayan P
Hello Experts,


I am new to ansible and deploying kamailio through ansible.Sucessfully deployed 
kamailio but my requirement is to add media server through ansible.As I am 
using dispatcher module in kamailio,not able to find any script that directly 
insert one media server IP and port into dispatcher table from ansible.(I am 
using ansible in one system and deploying kamailio in other).




Any suggestion will be highly appreciated as always.



Thanks,

Narayan

+91-9035438928



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] sr-users Digest, Vol 146, Issue 2

2017-07-04 Thread Narayan P
Hi Daniel/Sebastian,


Thanks for the information.I have disabled digest mode now.

I have installed rtpengine but don't know from which part rtpengine and 
rtpproxy functions needs to be called from.


my client is getting 183 from kamailio(ipv6 address) ,inside c= line ip6 
address is there.So that client is  canceling as it is on ipv4 network and 
giving error 488.


My architecture is like this,
external ipv4 network(port 5060)--rtpproxy(ipv4)--kamailio(ipv6)(port 
5070)--client(ipv4)(port 5077)


I have also attached the wireshark capture before.

Any suggestion will be highly appreciated.


Thanks,

Narayan



From: Daniel-Constantin Mierla <mico...@gmail.com>
Sent: Tuesday, July 4, 2017 11:18:01 AM
To: Kamailio (SER) - Users Mailing List; Narayan P; Sebastian Damm
Subject: Re: [SR-Users] sr-users Digest, Vol 146, Issue 2


Hello,


if you want to participate on a discussion, consider to disable receiving daily 
digests, because replying to it is not keeping the relation to the original 
discussion -- it is hard to figure out to which discussion you replied, and by 
that, very likely nobody will follow up with a response.


At least, if replying to a digest summary, don't keep the entire content of the 
message, remove the irrelevant parts. This also makes the size of the email 
smaller, which is very useful when reading on mobile devices.


Cheers,
Daniel

On 03.07.17 17:49, Narayan P wrote:

Hi Sebastian,


Thanks for your reply.


Today I am trying to install rtpengine as suggested by you.Could you please 
tell me from which part of the script I need to add  rtpengine functions as my 
client is getting 183 from kamailio as of now.


My architecture is like this,

external ipv4 network(port 5060)--rtpproxy(ipv4)--kamailio(ipv6)(port 
5070)--client(ipv4)(port 5077)


Please look at the attached wireshark capture.


Highly appreciate any suggestion as always.


Thanks,

Narayan

[...]

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- 
www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>

miconda (@miconda) | Twitter<http://www.twitter.com/miconda>
www.twitter.com
The latest Tweets from miconda (@miconda). Co-founder and leader of Kamailio 
SIP Server project (former OpenSER). C Dev. Open Source RTC advocate. SIP, 
VoIP, VoLTE and WebRTC consultancy at Asipto. Berlin, Germany

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] How to convert ipv6 to ipv4 address inside message body

2017-06-30 Thread Narayan P
Hi,


I am using kamailio as outbound proxy integrated with rtpproxy.I have done the 
configuration of ipv6 to ipv4 network.

But when 183 session progress came ,kamailio is sending its ipv6 address to 
pjsip client inside sdp body.So that  it is not accepting and 488 error message 
is giving.


How to convert ipv6 to ipv4  inside kamailio so that pjsip can accept.

Below is the sip trace from client.


20:49:20.152pjsua_app.c  .Call 0 state changed to EARLY (183 Session 
progress)
20:49:20.152  pjsua_media.c  .Call 0: updating media..
20:49:20.152  pjsua_media.c  ..pjmedia_stream_info_from_sdp() failed for 
call_id 0 media 0: Unsupported address family (PJ_EAFNOTSUP)
20:49:20.152  pjsua_media.c  ..Error updating media call00:0: Unsupported 
address family (PJ_EAFNOTSUP)
20:49:20.152   pjsua_call.c  .Unable to create media session: No active 
media stream after negotiation (PJMEDIA_SDPNEG_ENOMEDIA) [status=220048]
20:49:20.152   pjsua_core.c  TX 418 bytes Request msg CANCEL/cseq=12308 
(tdta0x7f0b28008400) to UDP 2001:db8:bad:a55::2:5070:
CANCEL sip:919035438928@185.122.206.62 SIP/2.0
Via: SIP/2.0/UDP 
[2001:DB8:BAD:A55:0:0:0:2]:5077;rport;branch=z9hG4bKPj8pbyM6u7jh2tBncOqhPSbPMA8mK4RaIz
Max-Forwards: 70
From: sip:OTT919620649614@185.122.206.62;tag=YZDJ3TTb4kDIO2.0Bvuw8nrkTTNPBwtm
To: 
Call-ID: 7otfmBr7j6wvfhjlApd0xcHOPp6wsII6
CSeq: 12308 CANCEL
Route: 
Content-Length:  0


--end msg--
20:49:20.154   pjsua_core.c  .RX 457 bytes Response msg 200/CANCEL/cseq=12308 
(rdata0x7f0b28001d08) from UDP 2001:db8:bad:a55::2:5070:
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 
[2001:DB8:BAD:A55:0:0:0:2]:5077;rport=5077;branch=z9hG4bKPj8pbyM6u7jh2tBncOqhPSbPMA8mK4RaIz;received=2001:DB8:BAD:A55:0:0:0:2
From: sip:OTT919620649614@185.122.206.62;tag=YZDJ3TTb4kDIO2.0Bvuw8nrkTTNPBwtm
To: ;tag=6374de6d95f421336d5241fc0a072275-2b9b
Call-ID: 7otfmBr7j6wvfhjlApd0xcHOPp6wsII6
CSeq: 12308 CANCEL
Server: kamailio (5.0.0-dev5 (x86_64/linux))
Content-Length: 0


--end msg--
20:49:20.310   pjsua_core.c  .RX 380 bytes Response msg 487/INVITE/cseq=12308 
(rdata0x7f0b28001d08) from UDP 2001:db8:bad:a55::2:5070:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 
[2001:DB8:BAD:A55:0:0:0:2]:5077;rport=5077;branch=z9hG4bKPj8pbyM6u7jh2tBncOqhPSbPMA8mK4RaIz;received=2001:DB8:BAD:A55:0:0:0:2
From: ;tag=YZDJ3TTb4kDIO2.0Bvuw8nrkTTNPBwtm
To: 
CSeq: 12308 INVITE
Call-ID: 7otfmBr7j6wvfhjlApd0xcHOPp6wsII6
Content-Length: 0


--end msg--
20:49:20.310   pjsua_core.c  ..TX 412 bytes Request msg ACK/cseq=12308 
(tdta0x7f0b2800cf40) to UDP 2001:db8:bad:a55::2:5070:
ACK sip:919035438928@185.122.206.62 SIP/2.0
Via: SIP/2.0/UDP 
[2001:DB8:BAD:A55:0:0:0:2]:5077;rport;branch=z9hG4bKPj8pbyM6u7jh2tBncOqhPSbPMA8mK4RaIz
Max-Forwards: 70
From: sip:OTT919620649614@185.122.206.62;tag=YZDJ3TTb4kDIO2.0Bvuw8nrkTTNPBwtm
To: 
Call-ID: 7otfmBr7j6wvfhjlApd0xcHOPp6wsII6
CSeq: 12308 ACK
Route: 
Content-Length:  0


--end msg--
20:49:20.311pjsua_app.c  .Call 0 is DISCONNECTED [reason=488 (Not 
Acceptable Here)]
20:49:20.311 pjsua_app_comm  .
  [DISCONNCTD] To: ;tag=GB-1498835320600
Call time: 00h:00m:00s, 1st res in 361 ms, conn in 0ms
#0 audio deactivated
20:49:20.311  pjsua_media.c  .Call 0: deinitializing media..
20:49:20.311  pjsua_media.c  ...Media stream call00:0 is destroyed
20:49:21.311pjsua_aud.c !Closing sound device after idle for 1 second(s)
20:49:21.311pjsua_app.c  .Turning sound device OFF
20:49:21.311pjsua_aud.c  .Closing default sound playback device and default 
sound capture device


Any suggestion will be highly appreciated.


Thanks,

Narayan


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Not able to replace route_uri in contact header uri

2017-04-28 Thread Narayan P
Hi Daniel,


Thanks for your response.I have added this in the registrar module but it 
didn't work.


Please see the sip trace.


-end msg--
17:28:47.162 sip_endpoint.c  .Response msg 408/REGISTER/cseq=52880 
(rdata0x231b418) from 185.122.205.178:5070 was dropped/unhandled by any modules
17:28:47.404   pjsua_core.c  .TX 597 bytes Request msg REGISTER/cseq=3179 
(tdta0x2320060) to UDP 185.122.205.178:5070:
REGISTER sip:185.122.205.178:5070 SIP/2.0
Via: SIP/2.0/UDP 
172.22.13.41:5067;rport;branch=z9hG4bKPjd734f1a6-d644-4a96-913c-c31738a33eed
Max-Forwards: 70
From: 
<sip:OTT919620649614@185.122.205.178>;tag=9f62c1ea-36a3-4318-a767-55a6b278fd23
To: <sip:OTT919620649614@185.122.205.178>
Call-ID: 6fc0b9f9-8439-4fc6-a28e-05ce1e52ec80
CSeq: 3179 REGISTER
User-Agent: PJSUA v2.3 Linux-4.4.0.64/x86_64/glibc-2.19
Contact: <sip:OTT919620649614@172.22.13.41:5067;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, 
MESSAGE, OPTIONS
Content-Length:  0

Thanks,

Narayan


From: Daniel-Constantin Mierla <mico...@gmail.com>
Sent: Friday, April 21, 2017 9:36:37 AM
To: Narayan P; sr-us...@lists.sip-router.org
Subject: Re: Not able to replace route_uri in contact header uri


Hello,


skipping to understand exactly the purpose of what you want to achieve, if you 
want to replace the contact header uri with [username from old 
Contact]@[kamailio ip]:[kamailio port] , you can try this:


if(is_present_hf("Contact")) {

  remove_hf("Contact");

  append_hf("Contact: 
<sip:$(ct{tobody.user})@$Ri:$Rp><sip:$(ct{tobody.user})@$Ri:$Rp>\r\n)");

}


If doesn't work, let me know.


Cheers,
Daniel

On 20.04.17 16:09, Narayan P wrote:

Thanks for your kind Response Daniel,


Yes as you told with the requirement I have mentioned call will not reach 
client, I have explained my requirement in detail,


My requirement is to establish a call between 2 SIP clients Alice and Bob which 
are using 185.122.205.178(Kamailio) as outbound proxy and registered to a SIP 
SERVER,


I am not able to establish call between Alice and Bob, So I am trying to 
Replace the Contact header in Register request with Kamailio IP and then I will 
direct the Invite request to callee client using the data(Username to IP:port 
tuple) I have stored in Kamailio database.


Please suggest me if you have better Idea than what i am doing


Thanks & Regards

Narayan


From: Daniel-Constantin Mierla <mico...@gmail.com><mailto:mico...@gmail.com>
Sent: Tuesday, April 18, 2017 1:04:38 PM
To: Narayan P; 
sr-us...@lists.sip-router.org<mailto:sr-us...@lists.sip-router.org>
Subject: Re: Not able to replace route_uri in contact header uri


Hello,


to clarify, in the REGISTER you sent and pasted again below, from


Contact: 
<sip:OTT919620649614@125.16.231.74:25841;ob><sip:OTT919620649614@125.16.231.74:25841;ob>


you want to have:


Contact: 
<sip:OTT919620649614@185.122.205.178:5070;lr><sip:OTT919620649614@185.122.205.178:5070;lr>


If yes, then this doesn't look right at all, then the device cannot receive 
calls anymore. Maybe you can explain the purpose and then we may be able to 
offer some hints.


Cheers,
Daniel



REGISTER sip:185.122.206.62 SIP/2.0
Via: SIP/2.0/UDP 
125.16.231.74:25841;rport;branch=z9hG4bKPj592750e4-9a06-4662-a55e-a8a71dedb974
Route: <sip:185.122.205.178:5070;lr><sip:185.122.205.178:5070;lr>
Max-Forwards: 70
From: 
<sip:OTT919620649614@185.122.206.62><sip:OTT919620649614@185.122.206.62>;tag=35af1666-a2b1-4c6e-a7b6-8675845036e7
To: <sip:OTT919620649614@185.122.206.62><sip:OTT919620649614@185.122.206.62>
Call-ID: 5bc6558f-1ffc-4990-bc99-d099c4fdcbcb
CSeq: 41801 REGISTER
User-Agent: PJSUA v2.3 Linux-4.4.0.64/x86_64/glibc-2.19
Contact: 
<sip:OTT919620649614@125.16.231.74:25841;ob><sip:OTT919620649614@125.16.231.74:25841;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, 
MESSAGE, OPTIONS
Authorization: Digest username="OTT919620649614", realm="185.122.206.62", 
nonce="af7780946d2b72ddc5e765a68798e937", 
uri="sip:185.122.206.62", 
response="a4c0614fbc3c72ece619247de5766a4b", algorithm=MD5
Content-Length:  0


SIP/2.0 200 OK
Via: SIP/2.0/UDP 
125.16.231.74:25841;rport=25841;branch=z9hG4bKPj592750e4-9a06-4662-a55e-a8a71dedb974;received=125.16.231.74
From: 
<sip:OTT919620649614@185.122.206.62><sip:OTT919620649614@185.122.206.62>;tag=35af1666-a2b1-4c6e-a7b6-8675845036e7
Call-ID: 5bc6558f-1ffc-4990-bc99-d099c4fdcbcb
CSeq: 41801 REGISTER
To: 
<sip:OTT919620649614@185.122.206.62><sip:OTT919620649614@185.122.206.62>;tag=1492409213989
Expires: 50
Contact: 
<sip:OTT919620649614@125.16.231.74:25841;ob><sip:OTT919620649614@125.16.231.74:25841;ob>;expires=50
Content-Length: 0

O

Re: [SR-Users] Not able to replace route_uri in contact header uri

2017-04-20 Thread Narayan P
Thanks for your kind Response Daniel,


Yes as you told with the requirement I have mentioned call will not reach 
client, I have explained my requirement in detail,


My requirement is to establish a call between 2 SIP clients Alice and Bob which 
are using 185.122.205.178(Kamailio) as outbound proxy and registered to a SIP 
SERVER,


I am not able to establish call between Alice and Bob, So I am trying to 
Replace the Contact header in Register request with Kamailio IP and then I will 
direct the Invite request to callee client using the data(Username to IP:port 
tuple) I have stored in Kamailio database.


Please suggest me if you have better Idea than what i am doing


Thanks & Regards

Narayan


From: Daniel-Constantin Mierla <mico...@gmail.com>
Sent: Tuesday, April 18, 2017 1:04:38 PM
To: Narayan P; sr-us...@lists.sip-router.org
Subject: Re: Not able to replace route_uri in contact header uri


Hello,


to clarify, in the REGISTER you sent and pasted again below, from


Contact: 
<sip:OTT919620649614@125.16.231.74:25841;ob><sip:OTT919620649614@125.16.231.74:25841;ob>


you want to have:


Contact: 
<sip:OTT919620649614@185.122.205.178:5070;lr><sip:OTT919620649614@185.122.205.178:5070;lr>


If yes, then this doesn't look right at all, then the device cannot receive 
calls anymore. Maybe you can explain the purpose and then we may be able to 
offer some hints.


Cheers,
Daniel



REGISTER sip:185.122.206.62 SIP/2.0
Via: SIP/2.0/UDP 
125.16.231.74:25841;rport;branch=z9hG4bKPj592750e4-9a06-4662-a55e-a8a71dedb974
Route: <sip:185.122.205.178:5070;lr><sip:185.122.205.178:5070;lr>
Max-Forwards: 70
From: 
<sip:OTT919620649614@185.122.206.62><sip:OTT919620649614@185.122.206.62>;tag=35af1666-a2b1-4c6e-a7b6-8675845036e7
To: <sip:OTT919620649614@185.122.206.62><sip:OTT919620649614@185.122.206.62>
Call-ID: 5bc6558f-1ffc-4990-bc99-d099c4fdcbcb
CSeq: 41801 REGISTER
User-Agent: PJSUA v2.3 Linux-4.4.0.64/x86_64/glibc-2.19
Contact: 
<sip:OTT919620649614@125.16.231.74:25841;ob><sip:OTT919620649614@125.16.231.74:25841;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, 
MESSAGE, OPTIONS
Authorization: Digest username="OTT919620649614", realm="185.122.206.62", 
nonce="af7780946d2b72ddc5e765a68798e937", 
uri="sip:185.122.206.62", 
response="a4c0614fbc3c72ece619247de5766a4b", algorithm=MD5
Content-Length:  0


SIP/2.0 200 OK
Via: SIP/2.0/UDP 
125.16.231.74:25841;rport=25841;branch=z9hG4bKPj592750e4-9a06-4662-a55e-a8a71dedb974;received=125.16.231.74
From: 
<sip:OTT919620649614@185.122.206.62><sip:OTT919620649614@185.122.206.62>;tag=35af1666-a2b1-4c6e-a7b6-8675845036e7
Call-ID: 5bc6558f-1ffc-4990-bc99-d099c4fdcbcb
CSeq: 41801 REGISTER
To: 
<sip:OTT919620649614@185.122.206.62><sip:OTT919620649614@185.122.206.62>;tag=1492409213989
Expires: 50
Contact: 
<sip:OTT919620649614@125.16.231.74:25841;ob><sip:OTT919620649614@125.16.231.74:25841;ob>;expires=50
Content-Length: 0

On 17.04.17 08:38, Narayan P wrote:

Hi Daniel,


I am attaching here my sip trace at client side.Request you to see this.

My client IP in register request is 125.16.231.74 and the server on which 
kamailio is running is 185.122.205.178.


I want my contact header to be 
<sip:OTT919620649614@185.122.205.178:5070;lr><sip:OTT919620649614@185.122.205.178:5070;lr>


I am using avp_subst() function to replace this.But kamailio is not starting.

Please reply if I am in wrong way or have different understanding as I am very 
new to kamailio.


Thanks,

Narayan




From: Narayan P
Sent: Friday, April 14, 2017 12:54:25 PM
To: sr-us...@lists.sip-router.org<mailto:sr-us...@lists.sip-router.org>
Cc: moco...@gmail.com<mailto:moco...@gmail.com>
Subject: RE: Not able to replace route_uri in contact header uri

Hi Daniel,

Thanks for your response.

I mean to say,
In my register request the route header i.e. route_uri is 
 and contact header is 
@172.22.13.41<mailto:@172.22.13.41>.
I want my contact header to be 
@185.122.205.178<mailto:@185.122.205.178>.
So how can I replace the contact header's only domain part with route_uri.the 
user part of the contact header remains same.


Thanks,
Narayan


--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- 
www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - May 22-24 (USA) - 
www.asipto.com<http://www.asipto.com>
Kamailio World Conference - May 8-10, 2017 - 
www.kamailioworld.com<http://www.kamailioworld.com>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Not able to replace route_uri in contact header uri

2017-04-17 Thread Narayan P
Hi Daniel,


I am attaching here my sip trace at client side.Request you to see this.

My client IP in register request is 125.16.231.74 and the server on which 
kamailio is running is 185.122.205.178.


I want my contact header to be <sip:OTT919620649614@185.122.205.178:5070;lr>


I am using avp_subst() function to replace this.But kamailio is not starting.

Please reply if I am in wrong way or have different understanding as I am very 
new to kamailio.


Thanks,

Narayan




From: Narayan P
Sent: Friday, April 14, 2017 12:54:25 PM
To: sr-us...@lists.sip-router.org
Cc: moco...@gmail.com
Subject: RE: Not able to replace route_uri in contact header uri

Hi Daniel,

Thanks for your response.

I mean to say,
In my register request the route header i.e. route_uri is  
and contact header is @172.22.13.41.
I want my contact header to be @185.122.205.178.
So how can I replace the contact header's only domain part with route_uri.the 
user part of the contact header remains same.


Thanks,
Narayan

From: Narayan P
Sent: Thursday, April 13, 2017 11:13 AM
To: sr-us...@lists.sip-router.org
Subject: Re: Not able to replace route_uri in contact header uri

Hi ,

Can anybody help me how to replace the domain part of $route-uri in contact  
header .

I am using avp_subst().But kamailio is not starting.


I am new to kamailio.Any help will be highly appreciated.


Thanks,

Narayan


From: Narayan P
Sent: Wednesday, April 12, 2017 8:17:02 AM
To: sr-us...@lists.sip-router.org
Subject: Not able to replace route_uri in contact header uri


Hi All,

I am using pjsip client and kamailiio,both running on different servers.I want 
to replace the uri on which pjsip is running with the uri on which kamailio is 
running in contact header.
I put some logs on route[REGISTRAR] and able to see the $route_uri as kamailio 
server uri($avp(s:fs) and  $hdr(Contact) as pjsip server uri 
($avp(s:contact).But I am not able to replace the uri with avp_subst() function.

Can anybody help me how to replace the uri or with any any other function.

Below I have put the snippet of config file.


# Handle SIP registrations
route[REGISTRAR] {
if (!is_method("REGISTER")) return;

if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
#!ifdef WITH_NATSIPPING
# do SIP NAT pinging
setbflag(FLB_NATSIPPING);
#!endif
}
xlog("Narayan: before sending contact\n");
$avp(s:contact) = $hdr(Contact);
$avp(s:fs) = $route_uri;
xlog("Narayan: Forced socket is $avp(s:fs)\n");
xlog("Narayan: contact header is $avp(s:contact)\n");
avp_subst("$avp(s:contact)/avp(s:contac)/g", "/(.*)@(.*)/$route_uri/");
#avp_pushto("$ru/domain","$fd");
#rewritehostport("185.122.206.62:5060");
t_on_reply("MANAGE_REPLY");
t_relay();
#if (!save("location")) {
#   sl_reply_error();
#}
exit;
}


Any suggestion will be highly appreciated.


Thanks,
Narayan


root@dharm-VirtualBox:/home/dharm/rudra/pjsip_comp/pjsip-apps/bin# 
root@dharm-VirtualBox:/home/dharm/rudra/pjsip_comp/pjsip-apps/bin# 
root@dharm-VirtualBox:/home/dharm/rudra/pjsip_comp/pjsip-apps/bin# 
root@dharm-VirtualBox:/home/dharm/rudra/pjsip_comp/pjsip-apps/bin# 
./pjsua-x86_64-unknown-linux-gnu --local-port=5067 
--outbound=sip:185.122.205.178:5070 --config-file=config_cfg.cfg --no-tcp
11:49:40.373 os_core_unix.c !pjlib 2.3 for POSIX initialized
11:49:40.373 sip_endpoint.c  .Creating endpoint instance...
11:49:40.373  pjlib  .select() I/O Queue created (0xe95240)
11:49:40.373 sip_endpoint.c  .Module "mod-msg-print" registered
11:49:40.373 sip_transport.  .Transport manager created.
11:49:40.373   pjsua_core.c  .PJSUA state changed: NULL --> CREATED
11:49:40.373   pjsua_core.c  .pjsua_init

11:49:40.373   pjsua_core.c  .rtpCompStatus 0 rtpEncStatus 0 sipCompressStatus 
1  encryptionState 1

11:49:40.373 sip_endpoint.c  .Module "mod-pjsua-log" registered
11:49:40.373 sip_endpoint.c  .Module "mod-tsx-layer" registered
11:49:40.373 sip_endpoint.c  .Module "mod-stateful-util" registered
11:49:40.373 sip_endpoint.c  .Module "mod-ua" registered
11:49:40.373 sip_endpoint.c  .Module "mod-100rel" registered
11:49:40.373 sip_endpoint.c  .Module "mod-pjsua" registered
11:49:40.373 sip_endpoint.c  .Module "mod-invite" registered
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
11:49:40.427   pa_dev.c  ..PortAudio sound library initialized, st

Re: [SR-Users] Not able to replace route_uri in contact header uri

2017-04-14 Thread Narayan P
Hi Daniel,

Thanks for your response.

I mean to say,
In my register request the route header i.e. route_uri is  
and contact header is @172.22.13.41.
I want my contact header to be @185.122.205.178.
So how can I replace the contact header's only domain part with route_uri.the 
user part of the contact header remains same.


Thanks,
Narayan

From: Narayan P
Sent: Thursday, April 13, 2017 11:13 AM
To: sr-us...@lists.sip-router.org
Subject: Re: Not able to replace route_uri in contact header uri

Hi ,

Can anybody help me how to replace the domain part of $route-uri in contact  
header .

I am using avp_subst().But kamailio is not starting.


I am new to kamailio.Any help will be highly appreciated.


Thanks,

Narayan


From: Narayan P
Sent: Wednesday, April 12, 2017 8:17:02 AM
To: sr-us...@lists.sip-router.org
Subject: Not able to replace route_uri in contact header uri


Hi All,

I am using pjsip client and kamailiio,both running on different servers.I want 
to replace the uri on which pjsip is running with the uri on which kamailio is 
running in contact header.
I put some logs on route[REGISTRAR] and able to see the $route_uri as kamailio 
server uri($avp(s:fs) and  $hdr(Contact) as pjsip server uri 
($avp(s:contact).But I am not able to replace the uri with avp_subst() function.

Can anybody help me how to replace the uri or with any any other function.

Below I have put the snippet of config file.


# Handle SIP registrations
route[REGISTRAR] {
if (!is_method("REGISTER")) return;

if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
#!ifdef WITH_NATSIPPING
# do SIP NAT pinging
setbflag(FLB_NATSIPPING);
#!endif
}
xlog("Narayan: before sending contact\n");
$avp(s:contact) = $hdr(Contact);
$avp(s:fs) = $route_uri;
xlog("Narayan: Forced socket is $avp(s:fs)\n");
xlog("Narayan: contact header is $avp(s:contact)\n");
avp_subst("$avp(s:contact)/avp(s:contac)/g", "/(.*)@(.*)/$route_uri/");
#avp_pushto("$ru/domain","$fd");
#rewritehostport("185.122.206.62:5060");
t_on_reply("MANAGE_REPLY");
t_relay();
#if (!save("location")) {
#   sl_reply_error();
#}
exit;
}


Any suggestion will be highly appreciated.


Thanks,
Narayan



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Not able to replace route_uri in contact header uri

2017-04-13 Thread Narayan P
Hi ,

Can anybody help me how to replace the domain part of $route-uri in contact  
header .

I am using avp_subst().But kamailio is not starting.


I am new to kamailio.Any help will be highly appreciated.


Thanks,

Narayan


From: Narayan P
Sent: Wednesday, April 12, 2017 8:17:02 AM
To: sr-us...@lists.sip-router.org
Subject: Not able to replace route_uri in contact header uri


Hi All,

I am using pjsip client and kamailiio,both running on different servers.I want 
to replace the uri on which pjsip is running with the uri on which kamailio is 
running in contact header.
I put some logs on route[REGISTRAR] and able to see the $route_uri as kamailio 
server uri($avp(s:fs) and  $hdr(Contact) as pjsip server uri 
($avp(s:contact).But I am not able to replace the uri with avp_subst() function.

Can anybody help me how to replace the uri or with any any other function.

Below I have put the snippet of config file.


# Handle SIP registrations
route[REGISTRAR] {
if (!is_method("REGISTER")) return;

if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
#!ifdef WITH_NATSIPPING
# do SIP NAT pinging
setbflag(FLB_NATSIPPING);
#!endif
}
xlog("Narayan: before sending contact\n");
$avp(s:contact) = $hdr(Contact);
$avp(s:fs) = $route_uri;
xlog("Narayan: Forced socket is $avp(s:fs)\n");
xlog("Narayan: contact header is $avp(s:contact)\n");
avp_subst("$avp(s:contact)/avp(s:contac)/g", "/(.*)@(.*)/$route_uri/");
#avp_pushto("$ru/domain","$fd");
#rewritehostport("185.122.206.62:5060");
t_on_reply("MANAGE_REPLY");
t_relay();
#if (!save("location")) {
#   sl_reply_error();
#}
exit;
}


Any suggestion will be highly appreciated.


Thanks,
Narayan

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users