[SR-Users] PSTN call

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 28 10:40:24 CEST 2010


Hello,

On 10/25/10 3:49 PM, michel freiha wrote:
> Dear All,
>
> Can someone help me to connect my kamilio in order to make a PSTN call 
> by rewriting host tp PSTN gateway? I changed my config in a manner to 
> do that...The line is ringing but as soon as I open the line on other 
> side the call will hangup...Please find the piece of code
>
> # RTPProxy control
> route[RTPPROXY] {
> #!ifdef WITH_NAT
>         if (is_method("BYE")) {
>                 unforce_rtp_proxy();
>         } else if (is_method("INVITE")){
> rewritehost("XX.XX.XX.XX");
>                 force_rtp_proxy();
>         }
>         if (!has_totag()) add_rr_param(";nat=yes");
> #!endif
>         return;
> }
if all and only the calls to gateway go through this route, then it is 
ok. Normally, also in the default config, this route is acalled also for 
re-INVITEs where you should not change the host part.

To be able to give some hints why the call is hung up immediately, you 
have to grap the SIP trace, using ngrep, wireshark or tcpdump. I have 
seen such cases when the codecs in 200ok were not appropriate for 
caller, so it sends quickly ack and bye.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-users mailing list