<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: [OpenSER-Users] Wrong To: Field In SIP Packet when Sending to PSTN        GW</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Thanks for your reply I have used the subst function and as you said it did not work and that is not what is wrong..could it be different interpretation of the SIP stack..the GW software is supposed to follow RFC standards.<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Bogdan-Andrei Iancu [<A HREF="mailto:bogdan@voice-system.ro">mailto:bogdan@voice-system.ro</A>]<BR>
Sent: Fri 2/1/2008 9:04 PM<BR>
To: Ali Jawad<BR>
Cc: users@lists.openser.org<BR>
Subject: Re: [OpenSER-Users] Wrong To: Field In SIP Packet when Sending to PSTN GW<BR>
<BR>
I cannot pin point the problem, but as you originally said that the GW<BR>
is looking for number in TO I just pointed you that this is not correct.<BR>
<BR>
Of course, as an ultimate solution you can abuse the subst() function<BR>
from textops module and to brutally change the TO header, but it is not<BR>
something you should do at all because (a) it it against SIP protocol<BR>
and (b) the problem is in other place.<BR>
<BR>
Regards,<BR>
Bogdan<BR>
<BR>
<BR>
Ali Jawad wrote:<BR>
&gt; The error message I am getting is Call Failed: Not Found. The thing is<BR>
&gt; that the GW is working with Asterisk, Linksys phones and other 3rd Party<BR>
&gt; SIP proxies. Is there something I can do using OpenSer ? I have even<BR>
&gt; contacted the GW company and they said that they do have clients using<BR>
&gt; OpenSer.<BR>
&gt; Thanks for your reply.<BR>
&gt;<BR>
&gt; -----Original Message-----<BR>
&gt; From: Bogdan-Andrei Iancu [<A HREF="mailto:bogdan@voice-system.ro">mailto:bogdan@voice-system.ro</A>]<BR>
&gt; Sent: Friday, February 01, 2008 3:06 PM<BR>
&gt; To: Ali Jawad<BR>
&gt; Cc: users@lists.openser.org<BR>
&gt; Subject: Re: [OpenSER-Users] Wrong To: Field In SIP Packet when Sending<BR>
&gt; to PSTN GW<BR>
&gt;<BR>
&gt; Hi Ali,<BR>
&gt;<BR>
&gt; SIP routing (RFC3261) is done based on RURI and not To URI - TO does not<BR>
&gt;<BR>
&gt; change in the message. I would say your GW is outdated.<BR>
&gt;<BR>
&gt; Regards,<BR>
&gt; Bogdan<BR>
&gt;<BR>
&gt; Ali Jawad wrote:<BR>
&gt;&nbsp;&nbsp;<BR>
&gt;&gt; Hi All<BR>
&gt;&gt;<BR>
&gt;&gt; I am using OpenSER as a proxy to make outbound calls my config is very<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;<BR>
&gt;&gt; simple if the number dialled is not an openser account route it to the<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;<BR>
&gt;&gt; PSTN gw.<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; if(does_uri_exist()){<BR>
&gt;&gt; # local uri does exist, is probably a user.<BR>
&gt;&gt; # lookup location<BR>
&gt;&gt; if(lookup(&quot;location&quot;)){<BR>
&gt;&gt; route(1);<BR>
&gt;&gt; return;<BR>
&gt;&gt; }<BR>
&gt;&gt; *} else {<BR>
&gt;&gt; # probably a call to pstn....<BR>
&gt;&gt; route(2);<BR>
&gt;&gt; return;<BR>
&gt;&gt; }*<BR>
&gt;&gt; and<BR>
&gt;&gt; route[2]<BR>
&gt;&gt; {<BR>
&gt;&gt; # pstn handling, simply route out to pstn.<BR>
&gt;&gt; *sethostport(&quot;xx.xx.xx.xx:5060&quot;);*<BR>
&gt;&gt; route(1);<BR>
&gt;&gt; }<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; The problem is that once the SIP packet arrives at the PSTN GW it does<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;<BR>
&gt;&gt; NOT have the correct TO: set. Therefore the call does not get routed .<BR>
&gt;&gt;<BR>
&gt;&gt; In the example below TO: is sip:calledNumber@myOpenserDomain instead<BR>
&gt;&gt; of sip:calledNumber@PSTN.GATEWAY.IP.IP<BR>
&gt;&gt;<BR>
&gt;&gt; Caller: ali [!at] jabber.splendor.net (replace the [!at] with a @)<BR>
&gt;&gt; Callee: 009613041708<BR>
&gt;&gt; OpenSerDomain: jabber.splendor.net<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; U +0.289348 PSTN.GW.IP.IP:5060 -&gt; 193.237.226.252:5060<BR>
&gt;&gt; SIP/2.0 404 Not Found .<BR>
&gt;&gt; Via: SIP/2.0/UDP 193.237.226.252;rport;branch=z9hG4bK6828.10c0315.0.<BR>
&gt;&gt; Via: SIP/2.0/UDP<BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; 192.168.0.176:65068;received=193.227.186.146;branch=z9hG4bK-d87543-be62c<BR>
&gt; 55d821be10d-1--d87543-;rport=65068.<BR>
&gt;&nbsp;&nbsp;<BR>
&gt;&gt; Record-Route: &lt;sip:193.237.226.252;lr=on&gt;.<BR>
&gt;&gt; From: &quot;ssafass&quot; &lt;sip:ali@jabber.splendor.net&gt;;tag=f36d6608.<BR>
&gt;&gt; To: &quot;009613041705&quot;<BR>
&gt;&gt; *&lt;sip:009613041705@jabber.splendor.net&gt;;tag=GR52RWG346-34.*<BR>
&gt;&gt; Call-ID: 0942e159a72eab40ZmViZWY4YTVlOTRlOGJmZTM5ZDdkZGJiZjFmMTlmMjk..<BR>
&gt;&gt; CSeq: 1 INVITE.<BR>
&gt;&gt; Contact: &quot;0000&quot; &lt;sip:PSTN.GW.IP.IP:5060&gt;.<BR>
&gt;&gt; User-Agent: eyeBeam release 1003s stamp 31159.<BR>
&gt;&gt; Content-Length: 0.<BR>
&gt;&gt;<BR>
&gt;&gt; I did a siptrace on the interface of the SIP proxy<BR>
&gt;&gt;<BR>
&gt;&gt; <A HREF="http://pastebin.com/d56426d63">http://pastebin.com/d56426d63</A><BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &lt;<A HREF="http://www.voipuser.org/ship_to.php?url=http://pastebin.com/d56426d63">http://www.voipuser.org/ship_to.php?url=http://pastebin.com/d56426d63</A>&gt;<BR>
&gt;&nbsp;&nbsp;<BR>
&gt;&gt; This is my config:<BR>
&gt;&gt;<BR>
&gt;&gt; <A HREF="http://pastebin.com/m128ca16e">http://pastebin.com/m128ca16e</A><BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &lt;<A HREF="http://www.voipuser.org/ship_to.php?url=http://pastebin.com/m128ca16e">http://www.voipuser.org/ship_to.php?url=http://pastebin.com/m128ca16e</A>&gt;<BR>
&gt;&nbsp;&nbsp;<BR>
&gt;&gt;&nbsp;<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; ------------------------------------------------------------------------<BR>
&gt;&nbsp;&nbsp;<BR>
&gt;&gt; _______________________________________________<BR>
&gt;&gt; Users mailing list<BR>
&gt;&gt; Users@lists.openser.org<BR>
&gt;&gt; <A HREF="http://lists.openser.org/cgi-bin/mailman/listinfo/users">http://lists.openser.org/cgi-bin/mailman/listinfo/users</A><BR>
&gt;&gt;&nbsp;&nbsp;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;<BR>
<BR>
<BR>
--<BR>
This message has been scanned for viruses and<BR>
dangerous content by MailScanner, and is<BR>
believed to be clean.<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>