Re: [SR-Users] can kamailio send 183 to caller

2017-12-10 Thread
Hello Sammy,
I followed your instructions,  the config is as follows:
...
route[http_async_things]{
t_newtran();
$http_req(hdr) = "Content-Type: application/json";
$http_req(body) = $_s({"cmuid": "$var(cmuid)"});
http_async_query("http://127.0.0.1:8080;, "HTTP_REPLY");
}
...


kamailio returned 477,  here's the kamailio log:
Dec 11 07:23:44 kamailio-test-4 /usr/sbin/kamailio[2319]: CRITICAL: tm 
[timer.h:193]: _set_fr_retr(): already added: 0x7f0830995710 , 
tl=0x7f0830995730!!!
Dec 11 07:23:44 kamailio-test-4 /usr/sbin/kamailio[2319]: CRITICAL: tm 
[t_fwd.c:1587]: t_send_branch(): BUG: retransmission already started for: 
0x7f0830995710
Dec 11 07:23:44 kamailio-test-4 /usr/sbin/kamailio[2319]: CRITICAL: tm 
[timer.h:193]: _set_fr_retr(): already added: 0x7f08309958c0 , 
tl=0x7f08309958e0!!!
Dec 11 07:23:44 kamailio-test-4 /usr/sbin/kamailio[2319]: CRITICAL: tm 
[t_fwd.c:1587]: t_send_branch(): BUG: retransmission already started for: 
0x7f08309958c0
Dec 11 07:23:44 kamailio-test-4 /usr/sbin/kamailio[2319]: ERROR: sl 
[sl_funcs.c:362]: sl_reply_error(): stateless error reply used: Unfortunately 
error on sending to next hop occurred (477/SL)
Dec 11 07:23:54 kamailio-test-4 /usr/sbin/kamailio[2307]: WARNING: tm 
[t_suspend.c:191]: t_continue(): transaction is not suspended [4232:1719199494]
Dec 11 07:24:04 kamailio-test-4 /usr/sbin/kamailio[2306]: ERROR: 
http_async_client [async_http.c:198]: async_http_cb(): transaction not found 
4232:1719199494


somehow the http_async_query doesn't work, any idea?


Thanks



在 2017-12-11 13:41:41,"SamyGo" <govoi...@gmail.com> 写道:

Hi, 
I'm not sure if I understood correctly, however, it seems like if UserB is 
dialed then send call to FreeSWITCH in parallel to doing an http_async_query ; 
once the http query returns a response then send call to that response.

If I'm correct then you need to make use of branch_route. 

route{
...

append_branch("sip:prompt-tone@freeswitch");
t_on_branch("api_query");
route(RELAY);
}

Then create the branch route "api_query" and in there execute your HTTP async 
query. 
branch_route[api_query]{ 
 if($rU != "freeswitch") 
 route(http_aysnc_things);
}

route[http_async_things]{
   Code example from here: 
https://www.kamailio.org/docs/modules/5.1.x/modules/http_async_client.html#http_async_client.f.http_async_query
}


route[HTTP_REPLY] {
if ($http_ok) {
xlog("L_INFO", "route[HTTP_REPLY]: status $http_rs body: $http_rb\n");
# Assuming the HTTP server replies with a SIP URI
$ru = $http_rb;
route(RELAY);
} else {
xlog("L_INFO", "route[HTTP_REPLY]: error  $http_err)\n");
}
}


Thats just my idea , the code might have syntax issues so correct accordingly. 
If above works then it should do both ringing and the API query in parallel. As 
I see it you're trying to append_branch and then doing a t_newtran->HTTP ASYNC 
query, causing the whole blockage and that explains if you remove the last 4 
line it works.


Regards,

Sammy








On Fri, Dec 1, 2017 at 3:14 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

Hello,
  I forgot to add route(RELAY) after the append_branch(). This brings 
another problem. Say the original INVITE is from A to B, what I want is:
  1. fork 1 more INVITE to freeswitch 
  2. discard the original A to B INVITE and wait for the 
http_async_query returns. When returns, the final destiation is determined, say 
C. Then send the INVITE to C. 


     However, after append_branch(), then original INVITE is sent to B anyway. 
How do I block the A to B INVITE?


Thanks

At 2017-12-01 15:13:10, "赵国杰" <zhaoguojie2...@163.com> wrote:

Hello Sammy,
 Yes, I want the kamailio to play ring-back music immediately after it 
receive the INVITE.  My plan is to append a branch to freeswitch and let 
freeswitch to play the music. The problem is append_branch() does not work in 
the following context:


if(is_method("INVITE")) {
append_branch("sip:prompt-tone@freeswitch");
xlog("append branch");
t_newtran();
$http_req(hdr) = "Content-Type: application/json";
$http_req(body) = $_s({"cmuid": "$var(cmuid)"});
http_async_query("http://127.0.0.1:8080;, "HTTP_REPLY");
}


if I remove the last 4 lines everything works fine. Otherwise, no forked INVITE 
will be sent to freeswitch. Unfortunately, I need the http_async_query to find 
the proper callee. Any suggestions?


Thanks

At 2017-11-30 23:49:59, "SamyGo" <govoi...@gmail.com> wrote:

Hi,
While Brandon is right, you can do absolutely do that but w/o any SDP or 
progress media in there. I'd ask why you want t

Re: [SR-Users] can kamailio send 183 to caller

2017-12-01 Thread
Hello,
  I forgot to add route(RELAY) after the append_branch(). This brings 
another problem. Say the original INVITE is from A to B, what I want is:
  1. fork 1 more INVITE to freeswitch 
  2. discard the original A to B INVITE and wait for the 
http_async_query returns. When returns, the final destiation is determined, say 
C. Then send the INVITE to C. 


 However, after append_branch(), then original INVITE is sent to B anyway. 
How do I block the A to B INVITE?


Thanks

At 2017-12-01 15:13:10, "赵国杰" <zhaoguojie2...@163.com> wrote:

Hello Sammy,
 Yes, I want the kamailio to play ring-back music immediately after it 
receive the INVITE.  My plan is to append a branch to freeswitch and let 
freeswitch to play the music. The problem is append_branch() does not work in 
the following context:


if(is_method("INVITE")) {
append_branch("sip:prompt-tone@freeswitch");
xlog("append branch");
t_newtran();
$http_req(hdr) = "Content-Type: application/json";
$http_req(body) = $_s({"cmuid": "$var(cmuid)"});
http_async_query("http://127.0.0.1:8080;, "HTTP_REPLY");
}


if I remove the last 4 lines everything works fine. Otherwise, no forked INVITE 
will be sent to freeswitch. Unfortunately, I need the http_async_query to find 
the proper callee. Any suggestions?


Thanks

At 2017-11-30 23:49:59, "SamyGo" <govoi...@gmail.com> wrote:

Hi,
While Brandon is right, you can do absolutely do that but w/o any SDP or 
progress media in there. I'd ask why you want to do that! If you want to feed 
some ring-back music I'd advise you to append a branch to a media-server like 
asterisk and then let that do it for you.


So here's one way of doing that.

if(is_method("INVITE")){
 append_branch("sip:183@192.168.1.5:5060");
...
}


where IP is of asterisk and dialplan is configured to provider Progress() with 
media. 


Again, it depends on why you want it?


Regards,
Sammy


On Wed, Nov 29, 2017 at 11:13 PM, Brandon Armstead <bran...@cryy.com> wrote:

if(is_method(“INVITE”)){ .


sl_send_reply(“183”, “Ringing”); 


}


On Wed, Nov 29, 2017 at 6:44 PM 赵国杰 <zhaoguojie2...@163.com> wrote:

Hello guys, 
 Is it possible for kamailio to initiate a 183 to caller?


Thanks 




 

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

--

Sent from Gmail Mobile

___
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] can kamailio send 183 to caller

2017-11-30 Thread
Hello Sammy,
 Yes, I want the kamailio to play ring-back music immediately after it 
receive the INVITE.  My plan is to append a branch to freeswitch and let 
freeswitch to play the music. The problem is append_branch() does not work in 
the following context:


if(is_method("INVITE")) {
append_branch("sip:prompt-tone@freeswitch");
xlog("append branch");
t_newtran();
$http_req(hdr) = "Content-Type: application/json";
$http_req(body) = $_s({"cmuid": "$var(cmuid)"});
http_async_query("http://127.0.0.1:8080;, "HTTP_REPLY");
}


if I remove the last 4 lines everything works fine. Otherwise, no forked INVITE 
will be sent to freeswitch. Unfortunately, I need the http_async_query to find 
the proper callee. Any suggestions?


Thanks

At 2017-11-30 23:49:59, "SamyGo" <govoi...@gmail.com> wrote:

Hi,
While Brandon is right, you can do absolutely do that but w/o any SDP or 
progress media in there. I'd ask why you want to do that! If you want to feed 
some ring-back music I'd advise you to append a branch to a media-server like 
asterisk and then let that do it for you.


So here's one way of doing that.

if(is_method("INVITE")){
 append_branch("sip:183@192.168.1.5:5060");
...
}


where IP is of asterisk and dialplan is configured to provider Progress() with 
media. 


Again, it depends on why you want it?


Regards,
Sammy


On Wed, Nov 29, 2017 at 11:13 PM, Brandon Armstead <bran...@cryy.com> wrote:

if(is_method(“INVITE”)){ .


sl_send_reply(“183”, “Ringing”); 


}


On Wed, Nov 29, 2017 at 6:44 PM 赵国杰 <zhaoguojie2...@163.com> wrote:

Hello guys, 
 Is it possible for kamailio to initiate a 183 to caller?


Thanks 




 

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

--

Sent from Gmail Mobile

___
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] play music while processing a http request

2017-11-16 Thread
Hello
Yes I did. It generates two files: ivr-unavailable-8000.wav.0 and 
ivr-unavailable-8000.wav.8

在 2017-11-16 15:50:05,"Rick Barenthin" <dun...@gmail.com> 写道:

Hello,


Did you have used the makeann from rtpproxy?


Quoting from manual:
"Instruct the RTPproxy to stream prompt/announcement pre-encoded with the 
makeann command from the RTPproxy distribution."



Am 15.11.2017 07:59 schrieb "赵国杰" <zhaoguojie2...@163.com>:

Hello guys,
I googled the problem and came up with the following solution
request_route {
...
if (rtpproxy_offer())
 t_on_reply("FORCE_RTPPROXY");
rtpproxy_stream2uac("/etc/kamailio/moh/ivr-unavailable-8000.wav", "-1");
t_newtran();
http_async_query("url here", "HTTP_REPLY");
}


route[HTTP_REPLY] {
...
# forward the invite to ua2
}


  on rtpproxy server,I got the following log:
INFO:siy6BoTWsN-w8cTbn9lRfnQV08Atsp6i:rtpp_stream_handle_play: -1 times 
playing prompt /etc/kamailio/moh/ivr-unavailable-8000.wav codec 8: 
SSRC=0x74A2C220, seq=10235


 However the caller has no audio, can anyone help?


Thanks





At 2017-11-14 18:04:13, "赵国杰" <zhaoguojie2...@163.com> wrote:

Hello guys,
I have the following senario:
   ua1 calls ua2. when the INVITE reaches the kamailio, before foward to 
ua2, kamailio has to do a http request using  “http_async_query”. However, the 
http request can take a really long time. I want the kamailio start playing 
music when the http request is sent and stop the music when the http response 
is received.
My config file is like this:


request_route {
...
t_newtran();
http_async_query("url here", "HTTP_REPLY");
}


route[HTTP_REPLY] {
...
# forward the invite to ua2
}
   how do i complete the config?


Thanks




 





 


___
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 bridge two landline users

2017-10-12 Thread
Hello,
In a standard sip flow, the call goes like: sip user A --> kamailio --> 
pstn --> landline user B. However, when user A has a bad internet access, the 
audio is broken. So what I want is to let sip user A send a invite to kamailio 
first, then kamailio send invite to user A and B's landline number through 
pstn, then bridge the two call together. 
I understand this can be achieved by using FREESWITCH originate and bridge 
command. I've tried but there's no audio both ways, which really makes me feel 
stupid of myself. So I'm wondering if this can be done with kamailio? If so, 
how?


Thanks
Jesse___
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 play ring tune when callee declines

2017-09-22 Thread


Thanks man,
I didn't explicitly set srtp in kamailio nor freeswitch, how do i turn it 
off?



At 2017-09-22 16:32:10, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:

Hi,


1) You need to change default password
"Open /usr/local/freeswitch/conf/vars.xml and change the default_password."


2) You are calling into Freeswitch with encryption on and probably of this your 
call is failing, maybe you can try first to try without SRTP and if it works, 
then you can try to make it work with SRTP


With kind regards,



Jurijs



On Fri, Sep 22, 2017 at 11:25 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:



Hello,
   No luck. Still the same. Here goes the full log, sorry if it's a little 
overwhelming



   INVITE sip:prompt-1000@10.240.0.90:5095 SIP/2.0
   Record-Route: <sip:35.202.167.70:5060;r2=on;lr;nat=yes>
   Record-Route: <sip:35.202.167.70:5061;transport=tls;r2=on;lr;nat=yes>
   Via: SIP/2.0/UDP 
35.202.167.70:5060;branch=z9hG4bK04d4.2c5c86a459371d838623651e8f5b6984.0;i=1
   Via: SIP/2.0/TLS 
10.60.208.121:43603;received=175.100.202.254;rport=33189;branch=z9hG4bKPj4dLalct0388uwB380xv2U0w0JRcTLD9Y;alias
   Max-Forwards: 69
   From: <sip:13112345678@35.202.167.70>;tag=MW06SkJdOZIiqvT4T9DFn0X5QazXW6BB
   To: <sip:12345@35.202.167.70>
   Contact: 
<sip:13112345678@175.100.202.254:33189;transport=TLS;ob;alias=175.100.202.254~33189~3>
   Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
   CSeq: 21643 INVITE
   Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, 
REFER, MESSAGE, OPTIONS
   Supported: replaces, 100rel, timer, norefersub
   Session-Expires: 1800
   Min-SE: 90
   User-Agent: CSipSimple_HWNXT-24/r2457
   Content-Type: application/sdp
   Content-Length:   515
   
   v=0
   o=- 3715057398 3715057398 IN IP4 35.185.130.154
   s=pjmedia
   c=IN IP4 35.185.130.154
   t=0 0
   m=audio 40026 RTP/AVP 9 8 0 106 101
   c=IN IP4 35.185.130.154
   a=rtcp:40027
   a=sendrecv
   a=rtpmap:9 G722/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:0 PCMU/8000
   a=rtpmap:106 speex/16000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:BrFCcbuKqPea6vy8L9Imh6dqhorYovx1RdXKlLsP
   a=crypto:2 AES_CM_128_HMAC_SHA1_32 
inline:9iwM/BpOGlSBK115waMNkpamPBj6prelcsjywL+M
   a=nortpproxy:yes
   
send 664 bytes to udp/[10.240.0.90]:5060 at 08:23:19.816105:
   
   SIP/2.0 100 Trying
   Via: SIP/2.0/UDP 
35.202.167.70:5060;branch=z9hG4bK04d4.2c5c86a459371d838623651e8f5b6984.0;i=1;received=10.240.0.90
   Via: SIP/2.0/TLS 
10.60.208.121:43603;received=175.100.202.254;rport=33189;branch=z9hG4bKPj4dLalct0388uwB380xv2U0w0JRcTLD9Y;alias
   Record-Route: <sip:35.202.167.70:5060;r2=on;lr;nat=yes>
   Record-Route: <sip:35.202.167.70:5061;transport=tls;r2=on;lr;nat=yes>
   From: <sip:13112345678@35.202.167.70>;tag=MW06SkJdOZIiqvT4T9DFn0X5QazXW6BB
   To: <sip:12345@35.202.167.70>
   Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
   CSeq: 21643 INVITE
   User-Agent: FreeSWITCH-mod_sofia/1.4.26+git~20160205T175853Z~ca9207aa32~64bit
   Content-Length: 0
   
   
2017-09-22 08:23:19.787973 [NOTICE] switch_channel.c:1077 New Channel 
sofia/internal/13112345678@35.202.167.70 [df38887c-8832-42f5-828d-ac89eb6ccf78]
2017-09-22 08:23:19.787973 [INFO] mod_dialplan_xml.c:635 Processing 13112345678 
<13112345678>->prompt-1000 in context public
2017-09-22 08:23:19.787973 [NOTICE] switch_ivr.c:1863 Transfer 
sofia/internal/13112345678@35.202.167.70 to XML[prompt-1000@default]
2017-09-22 08:23:19.787973 [INFO] mod_dialplan_xml.c:635 Processing 13112345678 
<13112345678>->prompt-1000 in context default
2017-09-22 08:23:19.787973 [CRIT] mod_dptools.c:1670 WARNING WARNING WARNING 
WARNING WARNING WARNING WARNING WARNING WARNING 
2017-09-22 08:23:19.787973 [CRIT] mod_dptools.c:1670 Open 
/usr/local/freeswitch/conf/vars.xml and change the default_password.
2017-09-22 08:23:19.787973 [CRIT] mod_dptools.c:1670 Once changed type 
'reloadxml' at the console.
2017-09-22 08:23:19.787973 [CRIT] mod_dptools.c:1670 WARNING WARNING WARNING 
WARNING WARNING WARNING WARNING WARNING WARNING 
2017-09-22 08:23:29.847976 [ERR] switch_core_media.c:3547 a=crypto in RTP/AVP, 
refer to rfc3711
2017-09-22 08:23:29.847976 [NOTICE] switch_channel.c:3752 Hangup 
sofia/internal/13112345678@35.202.167.70 [CS_EXECUTE] [INCOMPATIBLE_DESTINATION]
send 1081 bytes to udp/[10.240.0.90]:5060 at 08:23:29.858628:
   
   SIP/2.0 488 Not Acceptable Here
   Via: SIP/2.0/UDP 
35.202.167.70:5060;branch=z9hG4bK04d4.2c5c86a459371d838623651e8f5b6984.0;i=1;r

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread
ce, presence, as-feature-event, dialog, 
line-seize, call-info, sla, include-session-description, presence.winfo, 
message-summary, refer
   Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"
   Content-Length: 0
   Remote-Party-ID: "prompt-1000" 
<sip:prompt-1000@35.202.167.70>;party=calling;privacy=off;screen=no
   
   
2017-09-22 08:23:29.847976 [NOTICE] switch_core_session.c:1642 Session 1 
(sofia/internal/13112345678@35.202.167.70) Ended
2017-09-22 08:23:29.847976 [NOTICE] switch_core_session.c:1646 Close Channel 
sofia/internal/13112345678@35.202.167.70 [CS_DESTROY]
recv 365 bytes from udp/[10.240.0.90]:5060 at 08:23:29.859597:
   
   ACK sip:prompt-1000@10.240.0.90:5095 SIP/2.0
   Via: SIP/2.0/UDP 
35.202.167.70:5060;branch=z9hG4bK04d4.2c5c86a459371d838623651e8f5b6984.0;i=1
   Max-Forwards: 69
   From: <sip:13112345678@35.202.167.70>;tag=MW06SkJdOZIiqvT4T9DFn0X5QazXW6BB
   To: <sip:12345@35.202.167.70>;tag=3N0c8m5X06NBj
   Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
   CSeq: 21643 ACK
   Content-Length: 0
   
   



At 2017-09-22 16:14:37, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:

Hi,


You need to answer call too...


Try this:


 in freeswitch/conf/dialplan/default.xml


  


  

Please send full logs next time, you can remove IP-addresses and other info, 
but one line is not really helpful.

With kind regards,



Jurijs



On Fri, Sep 22, 2017 at 11:00 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com> wrote:

Hi,


You probably don't need record route and you need to remove ""


Try in this way:

  In kamailio.cfg I added if ($rU=="12345") {
if(is_method("INVITE")) {
#record_route();
$ru = "sip:prompt-1000@" + 
$sel(cfg_get.voicemail.srv_ip)
+ ":" + 
$sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
}
}


 in freeswitch/conf/dialplan/default.xml, i added

  

  



Jurijs



On Fri, Sep 22, 2017 at 10:54 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

Hi guy.
   sorry for the confusion. I'll try to reorganize it.


   In kamailio.cfg I added 
if ($rU=="12345") {
if(is_method("INVITE")) {
#record_route();
$ru = "sip:prompt-1000@" + 
$sel(cfg_get.voicemail.srv_ip)
+ ":" + 
$sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
}
}


 in freeswitch/conf/dialplan/default.xml, i added

  
 

  



sofia log:
   [NOTICE] switch_channel.c:1077 New Channel 
sofia/internal/13112345678@35.202.167.70 [848d0dd5-0513-41bd-982c-45a2a886e194]
   [INFO] mod_dialplan_xml.c:635 Processing 13112345678 
<13112345678>->prompt-1000 in context public
   [NOTICE] switch_ivr.c:1863 Transfer sofia/internal/13112345678@35.202.167.70 
to XML[prompt-1000@default]
   [INFO] mod_dialplan_xml.c:635 Processing 13112345678 
<13112345678>->prompt-1000 in context default
   [NOTICE] switch_ivr_originate.c:2759 Cannot create outgoing channel of type 
[error] cause: [USER_NOT_REGISTERED]
   [NOTICE] switch_ivr_originate.c:2759 Cannot create outgoing channel of type 
[user] cause: [USER_NOT_REGISTERED]
   
   SIP/2.0 480 Temporarily Unavailable
   ..
   Reason: SIP;cause=606;text="USER_NOT_REGISTERED"
 
   


However, if i delete: 
, 
the FS returns 488 instead of 480.  Reason: 
Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"


Thanks






At 2017-09-22 15:31:51, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:

Hi,


You need to add:

 
  

  



to conf/dialplan/default.xml


in your code, you had extra line what was sending a call to 1000 extension.


With kind regards,



Jurijs



On Fri, Sep 22, 2017 at 10:29 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com> wrote:

Hi,


So, problem is not related to record route but to config of freeswitch.


Not sure what you wrote in mail above, but you need to add code what provided 
Sergey to:

/usr/local/freeswitch/conf/dialplan/default.xml


With kind regards,



Jurijs



On Fri, Sep 22, 2017 at 10:11 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

Hello,
Thanks for the heads up. The siptrace does help.
Now the FS returns(with or without record_route();): 
  

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread
Hi guy.
   sorry for the confusion. I'll try to reorganize it.


   In kamailio.cfg I added 
if ($rU=="12345") {
if(is_method("INVITE")) {
#record_route();
$ru = "sip:prompt-1000@" + 
$sel(cfg_get.voicemail.srv_ip)
+ ":" + 
$sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
}
}


 in freeswitch/conf/dialplan/default.xml, i added

  
 

  



sofia log:
   [NOTICE] switch_channel.c:1077 New Channel 
sofia/internal/13112345678@35.202.167.70 [848d0dd5-0513-41bd-982c-45a2a886e194]
   [INFO] mod_dialplan_xml.c:635 Processing 13112345678 
<13112345678>->prompt-1000 in context public
   [NOTICE] switch_ivr.c:1863 Transfer sofia/internal/13112345678@35.202.167.70 
to XML[prompt-1000@default]
   [INFO] mod_dialplan_xml.c:635 Processing 13112345678 
<13112345678>->prompt-1000 in context default
   [NOTICE] switch_ivr_originate.c:2759 Cannot create outgoing channel of type 
[error] cause: [USER_NOT_REGISTERED]
   [NOTICE] switch_ivr_originate.c:2759 Cannot create outgoing channel of type 
[user] cause: [USER_NOT_REGISTERED]
   
   SIP/2.0 480 Temporarily Unavailable
   ..
   Reason: SIP;cause=606;text="USER_NOT_REGISTERED"
 
   


However, if i delete: 
, 
the FS returns 488 instead of 480.  Reason: 
Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"


Thanks






At 2017-09-22 15:31:51, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:

Hi,


You need to add:

 
  

  



to conf/dialplan/default.xml


in your code, you had extra line what was sending a call to 1000 extension.


With kind regards,



Jurijs



On Fri, Sep 22, 2017 at 10:29 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com> wrote:

Hi,


So, problem is not related to record route but to config of freeswitch.


Not sure what you wrote in mail above, but you need to add code what provided 
Sergey to:

/usr/local/freeswitch/conf/dialplan/default.xml


With kind regards,



Jurijs



On Fri, Sep 22, 2017 at 10:11 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

Hello,
Thanks for the heads up. The siptrace does help.
Now the FS returns(with or without record_route();): 
  SIP/2.0 480 Temporarily Unavailable
  Reason: SIP;cause=606;text="USER_NOT_REGISTERED"

   I have generate offline.xml under conf/directory/default. Where did i miss?


Thanks







At 2017-09-22 14:53:06, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:

Hi,


Sip trace from Freeswitch will help, but I think you need to insert 
Record-Route, try in following way:

if ($rU=="12345") {
if(is_method("INVITE")) {
record_route();
$ru = "sip:" + "offline" + "@" + 
$sel(cfg_get.voicemail.srv_ip)
+ ":" + 
$sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
}
}


With kind regards,



Jurijs



On Fri, Sep 22, 2017 at 7:19 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

Hello 
I added below code to let kamailio route invite to freeswitch:
if ($rU=="12345") {
if(is_method("INVITE")) {
$ru = "sip:" + "offline" + "@" + 
$sel(cfg_get.voicemail.srv_ip)
+ ":" + 
$sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
}
}


  in freeswitch dialplan/default.xml, i added
 
  


  



when i dialed 12345 on sip client, I can see the invite package to freeswitch, 
and that's it. No package coming back from freeswitch. Eventually, the sip 
client timeout. I
was hoping that when i dial 12345, "suite-espanola-op-47-leyenda.wav" will be 
played. What did i do wrong?


Thanks

At 2017-09-20 19:32:14, "Sergey Safarov" <s.safa...@gmail.com> wrote:

You can add this example to dialplan and make test



  



  





ср, 20 сент. 2017 г. в 10:14, 赵国杰 <zhaoguojie2...@163.com>:

Hello Sergey,
     I installed freeswitch, what should i do next?







At 2017-09-19 12:07:23, "Sergey Safarov" <s.safa...@gmail.com> wrote:


This can be implemenred using freeswitch.
Ping me directly after you install freeswith on linux and configure ssh remote 
access



вт, 19 сент. 2017 г., 6:27 赵国杰 <zhaoguojie2...@163.com>:

Thanks Daniel,

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread
Hello,
Thanks for the heads up. The siptrace does help.
Now the FS returns(with or without record_route();): 
  SIP/2.0 480 Temporarily Unavailable
  Reason: SIP;cause=606;text="USER_NOT_REGISTERED"

   I have generate offline.xml under conf/directory/default. Where did i miss?


Thanks







At 2017-09-22 14:53:06, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:

Hi,


Sip trace from Freeswitch will help, but I think you need to insert 
Record-Route, try in following way:

if ($rU=="12345") {
if(is_method("INVITE")) {
record_route();
$ru = "sip:" + "offline" + "@" + 
$sel(cfg_get.voicemail.srv_ip)
+ ":" + 
$sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
    }
}


With kind regards,



Jurijs



On Fri, Sep 22, 2017 at 7:19 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

Hello 
I added below code to let kamailio route invite to freeswitch:
if ($rU=="12345") {
if(is_method("INVITE")) {
$ru = "sip:" + "offline" + "@" + 
$sel(cfg_get.voicemail.srv_ip)
+ ":" + 
$sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
}
}


  in freeswitch dialplan/default.xml, i added
 
  


  



when i dialed 12345 on sip client, I can see the invite package to freeswitch, 
and that's it. No package coming back from freeswitch. Eventually, the sip 
client timeout. I
was hoping that when i dial 12345, "suite-espanola-op-47-leyenda.wav" will be 
played. What did i do wrong?


Thanks

At 2017-09-20 19:32:14, "Sergey Safarov" <s.safa...@gmail.com> wrote:

You can add this example to dialplan and make test



  



  





ср, 20 сент. 2017 г. в 10:14, 赵国杰 <zhaoguojie2...@163.com>:

Hello Sergey,
 I installed freeswitch, what should i do next?







At 2017-09-19 12:07:23, "Sergey Safarov" <s.safa...@gmail.com> wrote:


This can be implemenred using freeswitch.
Ping me directly after you install freeswith on linux and configure ssh remote 
access



вт, 19 сент. 2017 г., 6:27 赵国杰 <zhaoguojie2...@163.com>:

Thanks Daniel,
I've done some digging, and from Andrew Prokop's blog, it says this 
envolves early midia. Usually this is done by reply a 183 to the caller with 
media ip and port in the SDP. This makes sense but i still have no idea how to 
generate 183 response with embedded SDP.







At 2017-09-18 18:05:46, "Daniel Tryba" <d.tr...@pocos.nl> wrote:
>On Mon, Sep 18, 2017 at 03:37:22PM +0800, 赵国杰 wrote:
>>  I want the caller to play a short audio(like "the number your are 
>> calling is busy") when the callee declines the call. How can i do that?
>
>You need to check for the status codes in a failure route and then
>somehow generate audio somewhere, which is out of the scope of kamailio
>(maybe rtpproxy can do this, otherwise use something like asterisk):
>
>failure_route[MANAGE_FAILURE] {
>if (t_check_status("486"))
>{
>  $du=null;
>  $ru="busymess...@asterisk.example.org";
>  route(RELAY);
>  exit;
>}
>
>___
>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





 


___
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 play ring tune when callee declines

2017-09-21 Thread
Hello 
I added below code to let kamailio route invite to freeswitch:
if ($rU=="12345") {
if(is_method("INVITE")) {
$ru = "sip:" + "offline" + "@" + 
$sel(cfg_get.voicemail.srv_ip)
+ ":" + 
$sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
}
}


  in freeswitch dialplan/default.xml, i added
 
  


  



when i dialed 12345 on sip client, I can see the invite package to freeswitch, 
and that's it. No package coming back from freeswitch. Eventually, the sip 
client timeout. I
was hoping that when i dial 12345, "suite-espanola-op-47-leyenda.wav" will be 
played. What did i do wrong?


Thanks

At 2017-09-20 19:32:14, "Sergey Safarov" <s.safa...@gmail.com> wrote:

You can add this example to dialplan and make test


    
  



  





ср, 20 сент. 2017 г. в 10:14, 赵国杰 <zhaoguojie2...@163.com>:

Hello Sergey,
 I installed freeswitch, what should i do next?







At 2017-09-19 12:07:23, "Sergey Safarov" <s.safa...@gmail.com> wrote:


This can be implemenred using freeswitch.
Ping me directly after you install freeswith on linux and configure ssh remote 
access



вт, 19 сент. 2017 г., 6:27 赵国杰 <zhaoguojie2...@163.com>:

Thanks Daniel,
I've done some digging, and from Andrew Prokop's blog, it says this 
envolves early midia. Usually this is done by reply a 183 to the caller with 
media ip and port in the SDP. This makes sense but i still have no idea how to 
generate 183 response with embedded SDP.







At 2017-09-18 18:05:46, "Daniel Tryba" <d.tr...@pocos.nl> wrote:
>On Mon, Sep 18, 2017 at 03:37:22PM +0800, 赵国杰 wrote:
>>  I want the caller to play a short audio(like "the number your are 
>> calling is busy") when the callee declines the call. How can i do that?
>
>You need to check for the status codes in a failure route and then
>somehow generate audio somewhere, which is out of the scope of kamailio
>(maybe rtpproxy can do this, otherwise use something like asterisk):
>
>failure_route[MANAGE_FAILURE] {
>if (t_check_status("486"))
>{
>  $du=null;
>  $ru="busymess...@asterisk.example.org";
>  route(RELAY);
>  exit;
>}
>
>___
>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
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] how to play ring tune when callee declines

2017-09-18 Thread
Thanks Daniel,
I've done some digging, and from Andrew Prokop's blog, it says this 
envolves early midia. Usually this is done by reply a 183 to the caller with 
media ip and port in the SDP. This makes sense but i still have no idea how to 
generate 183 response with embedded SDP.







At 2017-09-18 18:05:46, "Daniel Tryba" <d.tr...@pocos.nl> wrote:
>On Mon, Sep 18, 2017 at 03:37:22PM +0800, 赵国杰 wrote:
>>  I want the caller to play a short audio(like "the number your are 
>> calling is busy") when the callee declines the call. How can i do that?
>
>You need to check for the status codes in a failure route and then
>somehow generate audio somewhere, which is out of the scope of kamailio
>(maybe rtpproxy can do this, otherwise use something like asterisk):
>
>failure_route[MANAGE_FAILURE] {
>if (t_check_status("486"))
>{
>  $du=null;
>  $ru="busymess...@asterisk.example.org";
>  route(RELAY);
>  exit;
>}
>
>___
>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 play ring tune when callee decline s

2017-09-18 Thread
Hi guys,
 I want the caller to play a short audio(like "the number your are calling 
is busy") when the callee declines the call. How can i do that?


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


Re: [SR-Users] missing request username on register

2017-06-27 Thread
I'm very sorry. I just found I mis-configured the advertise ip. It's very 
stupid of me. sorry






在 2017-06-27 18:37:11,"赵国杰" <zhaoguojie2...@163.com> 写道:

I just found that when client register to server B, client will append another 
Contact header after Authorization header, which makes the REGISTER have 2 
Contact headers. Not sure if it's relevant.





--

Guojie Zhao 
18664366579

At 2017-06-27 18:05:40, "赵国杰" <zhaoguojie2...@163.com> wrote:

Hello all,
 I have two kamailio servers(A and B) with exact same config using the same 
mysql db. I can register to A but not B. Server B complained:
 ERROR: 

Re: [SR-Users] caller id display through pstn

2017-06-12 Thread
Hello,
 The uac_replace_from works like a charm. However, preferred/asserted 
identity are not supported by some of the pstn providers.

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


Re: [SR-Users] user management of kamailio cluster

2017-06-11 Thread
Hello,
 This is really helpful, thanks.


At 2017-06-09 16:04:14, "Nathan Ward" <kamailio-sr-us...@daork.net> wrote:
Hi,


Developing such a solution is going to be quite complicated any way you look at 
it, and will require deep understanding of a number of things in order to 
operate it, and there are a number of tradeoffs you’ll need to make based on 
your exact use case. I don’t think a mailing list discussion is a going to get 
you the skills required to build a solution like this - you have quite a bit of 
study ahead of you.


However, if you cannot use DNS (why?) I can think of a few other options - 
these are presented merely as a starting point for your investigations - you’ll 
need to have a strong understanding of these in order to make decisions about 
which is appropriate for you:
1) Anycast - this uses IP routing to get to the closest instance of an IP 
address. You might want to combine that with a redirect if the message is sent 
to the anycast IP, to have the client do subsequent things by talking to the 
“real” IP of the server.
2) Use geoip to figure out where a user is, and redirect them to the closest 
instance if they are not already talking to that. Client will need to be 
configured to one of the servers? Or all of them with some sort of preference? 
Not sure what is appropriate for you here.
3) Use geoip like (2) but with a single central server, which replies with 301. 
This may work for some use cases - i.e. inbound heavy, and may not work with 
all clients.


There are a bunch of considerations - for example, what is “closest” ? I don’t 
expect you to answer that to me, but, you will need to have a clear definition 
before you can embark on this project.


On 9/06/2017, at 6:30 PM, 赵国杰 <zhaoguojie2...@163.com> wrote:


That's the thing. I'm not be able to use dns, just raw ip.

Cheers,
Jesse


在 2017-06-09 14:24:33,"David Villasmil" <david.villasmil.w...@gmail.com> 写道:

You'd need geographical dns resolution, the dns returns the ip closest to the 
request's location... I thought that's how you're deciding what ip to give to 
the users...
ᐧ


Regards,


David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Fri, Jun 9, 2017 at 2:20 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

Hi David,
 Does that mean the user send the request to a randomly selected kamailio 
first, and then use it as a hop to direct to the closest one? How can I direct 
the users to their closest kamailio? Is there any doc that I can refer to ??

Thanks
Jesse


在 2017-06-09 14:09:51,"David Villasmil" <david.villasmil.w...@gmail.com> 写道:

You can use the 
alias=udp:myglobaldomain:5060


to use a single domain, and direct the users to their closest ip.
ᐧ


Regards,


David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Fri, Jun 9, 2017 at 1:59 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

hello David,
I want the user to register to the kamailio server which is closest to the 
user. Each user(aka subscriber) has a unique domain, but my kamailio servers 
have 10 different domains which are their public ip. Let's say, based on user's 
ip, the closest kamailio server's domain is 35.185.3.4. I can use the one 
account which has the domain 35.185.3.4 to register to that kamailio server. I 
don't think I can do that with just 1 account. If i'm wrong, please tell me the 
write way.

Thanks
Jesse


在 2017-06-08 22:46:33,"David Villasmil" <david.villasmil.w...@gmail.com> 写道:
Sorry, i have to ask: why not just 1 account for all servers? There are many 
solutions to replicate the dbs, share the dbs amongst all kamailios, etc... 
just wondering

On Thu, Jun 8, 2017 at 8:42 AM zhaoguojie2...@163.com <zhaoguojie2...@163.com> 
wrote:

Hi all.
I have 10 kamailio servers across the world. Each of them has a public ip 
which is also their SIP DOMAIN. When a user register on my service, I'd use 
their username and password to generate 10 sip accounts, one for each kamailio 
server so that they can register to any of them.  So for each user I will have 
to insert 10 records in the subscriber table. Is there a better way to do this?

Cheers
Jesse
___
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







 

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


_

[SR-Users] route request to multiple pstn gws

2017-06-09 Thread
Hi all.
I  need to route calls to different counties to different pstn gateways. 
But in the config file, i can only set one pstn gw ip:port in pstn section. How 
should i do it? Can i use carrierroute module to do this?  If yes, can anyone 
paste a config sample?

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


Re: [SR-Users] user management of kamailio cluster

2017-06-09 Thread
hello David,
I want the user to register to the kamailio server which is closest to the 
user. Each user(aka subscriber) has a unique domain, but my kamailio servers 
have 10 different domains which are their public ip. Let's say, based on user's 
ip, the closest kamailio server's domain is 35.185.3.4. I can use the one 
account which has the domain 35.185.3.4 to register to that kamailio server. I 
don't think I can do that with just 1 account. If i'm wrong, please tell me the 
write way.

Thanks
Jesse


在 2017-06-08 22:46:33,"David Villasmil"  写道:
Sorry, i have to ask: why not just 1 account for all servers? There are many 
solutions to replicate the dbs, share the dbs amongst all kamailios, etc... 
just wondering

On Thu, Jun 8, 2017 at 8:42 AM zhaoguojie2...@163.com  
wrote:

Hi all.
I have 10 kamailio servers across the world. Each of them has a public ip 
which is also their SIP DOMAIN. When a user register on my service, I'd use 
their username and password to generate 10 sip accounts, one for each kamailio 
server so that they can register to any of them.  So for each user I will have 
to insert 10 records in the subscriber table. Is there a better way to do this?

Cheers
Jesse
___
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] TLS to UDP translation

2017-06-07 Thread
Hello,
the protocol scheme is sip.


Cheers
Jesse


At 2017-06-07 18:03:08, "Daniel-Constantin Mierla" <mico...@gmail.com> wrote:


Hello,

is the protocol scheme 'sips'? Because if the scheme is 'sip', the lack of 
transport parameter implies use of UDP.

Cheers,
Daniel




On 06.06.17 10:48, 赵国杰 wrote:



Hi Daniel,
  I solved the problem by add "transport=udp". Thanks anyway.

Cheers
Jesse


At 2017-06-06 15:36:22, "Daniel-Constantin Mierla" <mico...@gmail.com> wrote:


Hello,

if you set r-uri to a UDP address, then you can just use t_relay(), and 
everything needed should be done by kamailio. Be sure you do 
record_route()/loose_route(), so the requests within dialog are also routed 
properly.

Cheers,
Daniel




On 06.06.17 08:50, 赵国杰 wrote:

Hi everyone,
 I have a kamailio server with TLS enabled. I need to forword UAC request 
to a PSTN gateway which only support UDP. Is it possible that kamailio can 
translate this with proper configuration? How can i do this?

many thanks
Jesse




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




 



-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] no audio with kamailio & rtpproxy bebind NAT

2017-05-18 Thread
Hi everyone,
 I'm new to kamailio and rtpproxy and the problem's been bothering me for 
days. Any help would highly appreciated.
 My network topology is as follows:
 kamailio5.0 and rtpproxy2.0 are running on the same server. The server 
is behind NAT, its private ip is 10.240.0.62, public ip is 
 the server has 5060 tcp, 35000-65000 udp port enabled.
 There're 2 sip clients(test && test1) running in another 
LAN(175.100.202.xxx) .
 Situation:
 Both clients registered successfully and they can call each other. But 
neither of them has audio.(If i kill rtpproxy, audio is ok).


My kamailio cfg(only posted the part that i change),
#!KAMAILIO
#!define WITH_MYSQL
#!define WITH_DEBUG
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_ANTIFLOOD
#!define WITH_NAT
#!define WITH_PSTN


listen=udp:10.240.0.62:5060 advertise :5060
modparam("rtpproxy", "rtpproxy_sock", "udp:10.240.0.62:64000")
rtpproxy cmd:
rtpproxy -A  -F -l 10.240.0.62 -m 35000 -M 65000 -s udp:*:64000 -d 
INFO


I used  ngrep -d any -qt -W byline port 5060 to capture the sip msg, they 
are as follows:
U 2017/05/18 05:56:29.320152 175.100.202.33:10870 -> 10.240.0.62:5060
INVITE sip:test1@ SIP/2.0.
Via: SIP/2.0/UDP 
175.100.202.33:62434;rport;branch=z9hG4bK-524287-1---9e44840a531df765.
Max-Forwards: 70.
Contact: .
To: .
From: ;tag=106c953a.
Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ.
CSeq: 1 INVITE.
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, 
MESSAGE.
Content-Type: application/sdp.
Supported: replaces.
User-Agent: X-Lite release 4.9.8 stamp 84253.
Content-Length: 331.
.
v=0.
o=- 1500767650 1 IN IP4 175.100.202.33.
s=X-Lite release 4.9.8 stamp 84253.
c=IN IP4 175.100.202.33.
t=0 0.
m=audio 63960 RTP/AVP 9 8 120 0 84 101.
a=rtpmap:120 opus/48000/2.
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000.
a=rtpmap:84 speex/16000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.




U 2017/05/18 05:56:29.321103 10.240.0.62:5060 -> 175.100.202.33:10870
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 
175.100.202.33:62434;rport=10870;branch=z9hG4bK-524287-1---9e44840a531df765;received=175.100.202.33.
To: ;tag=24b9bbecdb24b798805f15f8519a2604.ea26.
From: ;tag=106c953a.
Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ.
CSeq: 1 INVITE.
Proxy-Authenticate: Digest realm="", 
nonce="WR04uVkdN40MqPSv+qEh76S0Jk2d2uq8".
Server: kamailio (5.0.1 (x86_64/linux)).
Content-Length: 0.
.




U 2017/05/18 05:56:29.384015 175.100.202.33:10870 -> 10.240.0.62:5060
ACK sip:test1@ SIP/2.0.
Via: SIP/2.0/UDP 
175.100.202.33:62434;rport;branch=z9hG4bK-524287-1---9e44840a531df765.
Max-Forwards: 70.
To: ;tag=24b9bbecdb24b798805f15f8519a2604.ea26.
From: ;tag=106c953a.
Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ.
CSeq: 1 ACK.
Content-Length: 0.
.




U 2017/05/18 05:56:29.388008 175.100.202.33:10870 -> 10.240.0.62:5060
INVITE sip:test1@ SIP/2.0.
Via: SIP/2.0/UDP 
175.100.202.33:62434;rport;branch=z9hG4bK-524287-1---7a361a514cf88b6b.
Max-Forwards: 70.
Contact: .
To: .
From: ;tag=106c953a.
Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ.
CSeq: 2 INVITE.
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, 
MESSAGE.
Content-Type: application/sdp.
Proxy-Authorization: Digest 
username="test",realm="",nonce="WR04uVkdN40MqPSv+qEh76S0Jk2d2uq8",uri="sip:test1@",response="e7c42929b9a62de980651327b3a6999c",algorithm=MD5.
Supported: replaces.
User-Agent: X-Lite release 4.9.8 stamp 84253.
Content-Length: 331.
.
v=0.
o=- 1500767650 1 IN IP4 175.100.202.33.
s=X-Lite release 4.9.8 stamp 84253.
c=IN IP4 175.100.202.33.
t=0 0.
m=audio 63960 RTP/AVP 9 8 120 0 84 101.
a=rtpmap:120 opus/48000/2.
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000.
a=rtpmap:84 speex/16000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.




U 2017/05/18 05:56:29.389271 10.240.0.62:5060 -> 175.100.202.33:10870
SIP/2.0 100 trying -- your call is important to us.
Via: SIP/2.0/UDP 
175.100.202.33:62434;rport=10870;branch=z9hG4bK-524287-1---7a361a514cf88b6b;received=175.100.202.33.
To: .
From: ;tag=106c953a.
Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ.
CSeq: 2 INVITE.
Server: kamailio (5.0.1 (x86_64/linux)).
Content-Length: 0.
.




U 2017/05/18 05:56:29.389935 10.240.0.62:5060 -> 175.100.202.254:53006
INVITE sip:test1@175.100.202.254:53006;ob SIP/2.0.
Record-Route: .
Via: SIP/2.0/UDP 
:5060;branch=z9hG4bKc9f1.223c15db97157715ffa93dfeb61a6d8e.0.
Via: SIP/2.0/UDP 
175.100.202.33:62434;received=175.100.202.33;rport=10870;branch=z9hG4bK-524287-1---7a361a514cf88b6b.
Max-Forwards: 69.
Contact: