<div dir="ltr"><br clear="all">Hi mates,<div>I have this setup:</div><div><span class="Apple-style-span" style="font-weight: bold;">Xlite---->Openser---->Asterisk------>VoIP to PTSN Provide</span>r</div><div><br></div>
<div>I use kamailio 1.3.3(port5060), MediaProxy and Asterisk 1.4 (port 5065) on the same Debian Box in Realtime with no NAT. Asterisk connects calls to the VoIP to PSTN provider. I am able to establish calls towards the PSTN side(Landline & Mobiles) but with no audio. I can hear the ringing tone but when the call connects and the conversation begin i hear nothing so as the Callee side. </div>
<div><br></div><div>Below are my configs,the ngrep captured packets and codecs.</div><div>####################################################################################</div><div><div>route[4] {</div><div> # routing to the public network</div>
<div> rewritehostport("xx.xxx.xxx.xx:5065");</div><div> t_on_failure("2");</div><div> if (!t_relay()) {</div><div> sl_reply_error();</div><div> };</div><div>exit;</div><div>}</div><div>
<br></div><div>route[6] {</div><div> #</div><div> # -- NAT handling --</div><div> #</div><div> if (isbflagset(6) || isbflagset(7)) {</div><div> append_hf("P-hint: Route[6]: mediaproxy \r\n");</div>
<div> use_media_proxy();</div><div> };</div><div>}</div><div><br></div><div>route[10] {</div><div> #from an internal domain -> inbound</div><div> #Native SIP destinations are handled using the location table</div>
<div> #Gateway destinations are handled by regular expressions</div><div> append_hf("P-hint: inbound->inbound \r\n");</div><div><br></div><div> if (uri=~"^sip:0[1-9][0-9]+@.*") {</div><div>
if (is_user_in("credentials","local")) {</div><div> strip(1);</div><div> prefix("27");</div><div> route(6);</div><div> route(4);</div><div> exit;</div>
<div> } else {</div><div> sl_send_reply("403", "No permissions for local calls");</div><div> exit;</div><div> };</div><div> };</div></div><div><div><br></div><div>
if (uri=~"^sip:00[1-9][0-9]+@.*") {</div><div> if (is_user_in("credentials","int")) {</div><div> strip(2);</div><div> route(6);</div><div> route(4);</div>
<div> exit;</div><div> } else {</div><div> sl_send_reply("403", "No permissions for international calls");</div><div> };</div><div> };</div><div><br></div></div><div>
###################################################################################</div><div><div>This call was from the xlite softphone 1974 towards the Landline 0123825710.</div><div>###################################################################################</div>
<div>U 2008/12/06 03:38:43.896057 <a href="http://196.212.209.18:46738">196.212.209.18:46738</a> -> kamailio IP:5060</div><div> INVITE sip:0123825710@KAMAILIO ip SIP/2.0..Via: SIP/2.0/UDP <a href="http://192.168.0.55">192.168.0.55</a>:</div>
<div> 46738;branch=z9hG4bK-d8754z-2d5e73428b95d262-1---d8754z-;rport..Max-Forward</div><div> s: 70..Contact: <<a href="http://sip:1974@196.212.209.18:46738">sip:1974@196.212.209.18:46738</a>>..To: "0123825710"<sip:01238</div>
<div> 25710@kamailio IP>..From: <sip:1974@kamailio IP>;tag=353dd217..Call-ID:</div><div> MGRiNzM0ZGYxZTk1ZDI3ZjZmMTRhMDVlNTQ0NTUwZjg...CSeq: 1 INVITE..Allow: INVIT</div><div> E, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO..Cont</div>
<div> ent-Type: application/sdp..User-Agent: X-Lite release 1014k stamp 47051..Co</div><div> ntent-Length: 237....v=0..o=- 1 2 IN IP4 192.168.0.55..s=CounterPath X-Lite</div><div> 3.0..c=IN IP4 192.168.0.55..t=0 0..m=audio 60782 RTP/AVP 0 8 3 101..a=fmtp</div>
<div> :101 0-15..a=rtpmap:101 telephone-event/8000..a=alt:1 1 : ljiQYRpD NiMZsfdZ</div><div> <a href="http://192.168.0.55">192.168.0.55</a> 60782..a=sendrecv..</div><div><br></div><div>U 2008/12/06 03:38:43.896350 Kamailio IP:5060 -> <a href="http://196.212.209.18:46738">196.212.209.18:46738</a></div>
<div> SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP <a href="http://192.168.0.55:46">192.168.0.55:46</a></div><div> 738;branch=z9hG4bK-d8754z-2d5e73428b95d262-1---d8754z-;rport=46738;received</div><div> =196.212.209.18..To: "0123825710"<sip:0123825710@kamailio IP>;tag=329cfea</div>
<div> a6ded039da25ff8cbb8668bd2.dcfe..From: <sip:1974@kamailio IP>;tag=353dd217</div><div> ..Call-ID: MGRiNzM0ZGYxZTk1ZDI3ZjZmMTRhMDVlNTQ0NTUwZjg...CSeq: 1 INVITE..Pr</div><div> oxy-Authenticate: Digest realm="<a href="http://41.208.212.97">41.208.212.97</a>", nonce="4939d8cfeb060ab14354</div>
<div> 85eee811cdf644f759a2"..Content-Length: 0....</div><div><br></div><div>U 2008/12/06 03:38:44.086313 <a href="http://196.212.209.18:46738">196.212.209.18:46738</a> -> kamailio IP:5060</div><div> ACK sip:0123825710@kamailio IP SIP/2.0..Via: SIP/2.0/UDP <a href="http://192.168.0.55:467">192.168.0.55:467</a></div>
<div> 38;branch=z9hG4bK-d8754z-2d5e73428b95d262-1---d8754z-;rport..To: "012382571</div><div> 0"<sip:0123825710@kamailio IP>;tag=329cfeaa6ded039da25ff8cbb8668bd2.dcfe.</div><div> .From: <<a href="mailto:sip%3A1974@41.208.212.97">sip:1974@41.208.212.97</a>>;tag=353dd217..Call-ID: MGRiNzM0ZGYxZTk1ZDI3</div>
<div> ZjZmMTRhMDVlNTQ0NTUwZjg...CSeq: 1 ACK..Content-Length: 0....</div><div><br></div></div><div><br></div><div><br></div><div><div>U 2008/12/06 03:38:44.582208 asterisk IP:5065 -> kamailio IP:5060</div><div> SIP/2.0 100 Trying..Via: SIP/2.0/UDP kamailio IP;branch=z9hG4bKd78.7bd576</div>
<div> 24.0;received=kamailio IP..Via: SIP/2.0/UDP 192.168.0.55:46738;received=1</div><div> <a href="http://96.212.209.18">96.212.209.18</a>;branch=z9hG4bK-d8754z-2aedec27a8ddd96c-1---d8754z-;rport=4673</div><div> 8..Record-Route: <sip:kamailio IP;lr=on;ftag=353dd217;nat=yes>..From: <si</div>
<div> p:1974@kamailio IP>;tag=353dd217..To: "0123825710"<sip:0123825710@41.208.</div><div> 212.97>..Call-ID: MGRiNzM0ZGYxZTk1ZDI3ZjZmMTRhMDVlNTQ0NTUwZjg...CSeq: 2 INV</div><div> ITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, RE</div>
<div> FER, SUBSCRIBE, NOTIFY..Supported: replaces..Contact: <sip:27123825710@41.2</div><div> 08.212.97:5065>..Content-Length: 0....</div><div><br></div><div>U 2008/12/06 03:38:44.711225 <a href="http://70.42.72.49:5060">70.42.72.49:5060</a> -> Asterisk IP:5065</div>
<div> SIP/2.0 100 Giving a try..Via: SIP/2.0/UDP Asterisk IP:5065;branch=z9hG4b</div><div> K22abec12;rport=5065..From: "1974" <sip:1974@Asterisk IP:5065>;tag=as6a7c</div><div> b89f..To: <<a href="mailto:sip%3A1214650027123825710@70.42.72.49">sip:1214650027123825710@70.42.72.49</a>>..Call-ID: 1934f5d443abffe07</div>
<div> c59d0a42215b49c@41.208.212.97..CSeq: 102 INVITE..Server: OpenSER (1.3.2-not</div><div> ls (i386/solaris))..Content-Length: 0....</div><div><br></div><div>U 2008/12/06 03:38:47.206445 <a href="http://70.42.72.49:5060">70.42.72.49:5060</a> -> Asterisk IP:5065</div>
<div> SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP Asterisk IP:5065;branch=z9</div><div> hG4bK22abec12;rport=5065..From: "1974" <sip:1974@Asterisk IP:5065>;tag=as</div><div> 6a7cb89f..To: <<a href="mailto:sip%3A1214650027123825710@70.42.72.49">sip:1214650027123825710@70.42.72.49</a>>;tag=cba-1a6e-48ecbab6..</div>
<div> Call-ID: 1934f5d443abffe07c59d0a42215b49c@Asterisk IP..CSeq: 102 INVITE..</div><div> Contact: <<a href="mailto:sip%3A1214650027123825710@70.42.72.138">sip:1214650027123825710@70.42.72.138</a>>..Date: Wed, 08 Oct 2008 13:</div>
<div> 50:49 GMT..Server: BRSIP v2.0.1.2..Record-Route: <sip:<a href="http://70.42.72.49">70.42.72.49</a>;lr=on;fta</div><div> g=as6a7cb89f>..Content-Type: application/sdp..Content-Length: 212....v=0..o</div><div> =BRSDP 792898 792898 IN IP4 216.49.201.22..s=BRSDP Session..c=IN IP4 216.49</div>
<div> .201.22..t=0 0..m=audio 27852 RTP/AVP 0 101..a=ptime:20..a=rtpmap:0 PCMU/80</div><div> 00..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-15..</div><div><br></div><div>U 2008/12/06 03:38:47.206891 Asterisk IP:5065 -> Kamailio IP:5060</div>
<div> SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP kamailio IP;branch=z9hG4bK</div><div> d78.7bd57624.0;received=kamailio IP..Via: SIP/2.0/UDP <a href="http://192.168.0.55:46738">192.168.0.55:46738</a>;</div><div> received=<a href="http://196.212.209.18">196.212.209.18</a>;branch=z9hG4bK-d8754z-2aedec27a8ddd96c-1---d8754z-;</div>
<div> rport=46738..Record-Route: <sip:<a href="http://41.208.212.97">41.208.212.97</a>;lr=on;ftag=353dd217;nat=yes>.</div><div> .From: <sip:1974@kamilio IP>;tag=353dd217..To: "0123825710"<sip:01238257</div>
<div> <a href="mailto:10@41.208.212.97">10@41.208.212.97</a>>;tag=as4377a96d..Call-ID: MGRiNzM0ZGYxZTk1ZDI3ZjZmMTRhMDVl</div><div> NTQ0NTUwZjg...CSeq: 2 INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK,</div><div>
CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Conta</div><div> ct: <sip:27123825710@Asterisk IP:5065>..Content-Type: application/sdp..Co</div><div> ntent-Length: 287....v=0..o=root 2664 2664 IN IP4 41.208.212.97..s=session.</div>
<div><div> .c=IN IP4 41.208.212.97..t=0 0..m=audio 19202 RTP/AVP 8 0 3 101..a=rtpmap:8</div><div> PCMA/8000..a=rtpmap:0 PCMU/8000..a=rtpmap:3 GSM/8000..a=rtpmap:101 telepho</div><div> ne-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..a=ptime:20..a=se</div>
<div> ndrecv..</div><div><br></div><div>U 2008/12/06 03:38:47.207106 Kamailio IP:5060 -> <a href="http://196.212.209.18:46738">196.212.209.18:46738</a></div><div> SIP/2.0 183 Session Progress..Via: SIP/2.0/UDP 192.168.0.55:46738;received=</div>
<div> <a href="http://196.212.209.18">196.212.209.18</a>;branch=z9hG4bK-d8754z-2aedec27a8ddd96c-1---d8754z-;rport=467</div><div> 38..Record-Route: <sip:kamailio IP;lr=on;ftag=353dd217;nat=yes>..From: <s</div><div>
ip:1974@Kamailio IP>;tag=353dd217..To: "0123825710"<sip:0123825710@kamilio IP>;tag=as4377a96d..Call-ID: MGRiNzM0ZGYxZTk1ZDI3ZjZmMTRhMDVlNTQ0NTUwZ</div><div> jg...CSeq: 2 INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL,</div>
<div> OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Contact: <sip:</div><div> <a href="http://27123825710@41.208.212.97:5065">27123825710@41.208.212.97:5065</a>>..Content-Type: application/sdp..Content-Len</div>
<div> gth: 287....v=0..o=root 2664 2664 IN IP4 Asterisk IP..s=session..c=IN IP4</div><div> 41.208.212.97..t=0 0..m=audio 19202 RTP/AVP 8 0 3 101..a=rtpmap:8 PCMA/800</div><div> 0..a=rtpmap:0 PCMU/8000..a=rtpmap:3 GSM/8000..a=rtpmap:101 telephone-event/</div>
<div> 8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..a=ptime:20..a=sendrecv..</div><div><br></div></div><div>########################################################################################</div><div>Sip.conf</div>
<div><div><div>[general]</div><div>context=from-trunk </div><div>bindport=5065 </div><div>autocreatepeer=yes </div><div>bindaddr=xx.xxx.xxx.xx </div>
<div> </div><div> </div><div>disallow=all </div><div>;allow=gsm</div><div>;allow=amr</div><div>allow=alaw</div><div>allow=ulaw </div>
<div>allow=gsm</div><div>;allow=ilbc </div><div>;disallow=all</div><div>;</div><div>;useragent=Asterisk PBX </div><div>dtmfmode = rfc2833 </div><div> </div>
<div>domain=xx.xxx.xxx.xx ; Add IP address as local domain</div><div> </div></div><div>[Provider]</div><div>disallow=all</div><div>canreinvite=no</div><div>context=from-trunk</div>
<div>allow=all</div><div>;allow=ulaw</div><div>;allow=gsm</div><div>host=xx.xx.xx.xx</div><div>insecure=port,invite</div><div>type=peer ; we only want to call out, not be call$</div><div>dtmfmode=rfc2833</div>
</div><div>#########################################################################################</div><div>Here is my codecs</div><div><br></div><div><div>41*CLI> core show translation</div><div> Translation times between formats (in milliseconds) for one second of data</div>
<div> Source Format (Rows) Destination Format (Columns)</div><div><br></div><div> g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 amr</div><div> g723 - - - - - - - - - - - - - -</div>
<div> gsm - - 2 2 2 2 1 5 - 19 - 2 - 14</div><div> ulaw - 5 - 1 2 2 1 5 - 19 - 2 - 14</div><div> alaw - 5 1 - 2 2 1 5 - 19 - 2 - 14</div>
<div> g726aal2 - 5 2 2 - 2 1 5 - 19 - 1 - 14</div><div> adpcm - 5 2 2 2 - 1 5 - 19 - 2 - 14</div><div> slin - 4 1 1 1 1 - 4 - 18 - 1 - 13</div>
<div> lpc10 - 6 3 3 3 3 2 - - 20 - 3 - 15</div><div> g729 - - - - - - - - - - - - - -</div><div> speex - 6 3 3 3 3 2 6 - - - 3 - 15</div>
<div> ilbc - - - - - - - - - - - - - -</div><div> g726 - 5 2 2 1 2 1 5 - 19 - - - 14</div><div> g722 - - - - - - - - - - - - - -</div>
<div> amr - 6 3 3 3 3 2 6 - 20 - 3 - -</div><div> </div><div><br></div></div><div><br></div>With best regards,</div><div>Lu.</div><div><br></div><div>-- <br>Luzango Mfupe<br>
TUUNE MOBILE<br>Tel:0128440528/0123825710<br>Tshwane-RSA<br><br>"...Ships are safe in harbor, but they were never meant to stay there......."<br>
</div></div>