<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi All <br>
<br>
I am using OpenSER as a proxy to make outbound calls my config is very simple
if the number dialled is not an openser account route it to the PSTN gw. <br>
<br>
<br>
if(does_uri_exist()){ <br>
# local uri does exist, is probably a user. <br>
# lookup location <br>
if(lookup(&quot;location&quot;)){ <br>
route(1); <br>
return; <br>
} <br>
<b><span style='font-weight:bold'>} else { <br>
# probably a call to pstn.... <br>
route(2); <br>
return; <br>
}</span></b> <br>
and <br>
route[2] <br>
{ <br>
# pstn handling, simply route out to pstn. <br>
<b><span style='font-weight:bold'>sethostport(&quot;xx.xx.xx.xx:5060&quot;);</span></b>
<br>
route(1); <br>
} <br>
<br>
<br>
<br>
The problem is that once the SIP packet arrives at the PSTN GW it does NOT have
the correct TO: set. Therefore the call does not get routed .<br>
<br>
In the example below TO: is sip:calledNumber@myOpenserDomain instead of
sip:calledNumber@PSTN.GATEWAY.IP.IP <br>
<br>
Caller: ali [!at] jabber.splendor.net (replace the [!at] with a @) <br>
Callee: <span fn_index=0 info="Call +9613041708;0;+9613041708;1;" onmouseup="SetCallButtonPressed(this, 0,1)"
onmousedown="SetCallButtonPressed(this, 1,1)"
onmouseover="SetCallButton(this, 1,1);skype_active=CheckCallButton(this);"
onmouseout="SetCallButton(this, 0,1);HideSkypeMenu();" context=009613041708 rtl=false
id="__skype_highlight_id"><span
title="This is a Lebanon phone number. The country code cannot be changed."
onclick="javascript:if(0){doRunCMD(event, 'chdial','0');}else{doRunCMD(event, 'call','+9613041708');}event.preventBubble();return false;"
onmouseout="SetCallButtonPart(this, 0);"
onmouseover="SetCallButtonPart(this, 1);" id="__skype_highlight_id_left"><span
id="__skype_highlight_id_left_adge"><img width=11 height=11 id="_x0000_i1025"
src="cid:image001.gif@01C864E2.5951F8F0" class="skype_tb_img_adge"></span><span
id="__skype_highlight_id_left_img"><img width=32 height=32 id="_x0000_i1026"
src="cid:image002.gif@01C864E2.5951F8F0" title="" class="skype_tb_img_flag"
name="skype_tb_img_f0"></span></span><span
title="Call this phone number in Lebanon with Skype: +9613041708" onclick="javascript:doRunCMD(event, 'call','+9613041708');event.preventBubble();return false;"
onmouseout="SetCallButtonPart(this, 0)" onmouseover="SetCallButtonPart(this, 1)"
id="__skype_highlight_id_right"><span id="__skype_highlight_id_innerText"><img
width=1 height=1 id="_x0000_i1027" src="cid:image003.gif@01C864E2.5951F8F0"
class="skype_tb_img_space"><img width=1 height=1 id="_x0000_i1028"
src="cid:image003.gif@01C864E2.5951F8F0" class="skype_tb_img_space"><img
width=1 height=1 id="_x0000_i1029" src="cid:image003.gif@01C864E2.5951F8F0"
class="skype_tb_img_space"><img width=1 height=1 id="_x0000_i1030"
src="cid:image003.gif@01C864E2.5951F8F0" class="skype_tb_img_space"><span
class=skypetbinnertext>009613041708</span></span><span
id="__skype_highlight_id_right_adge"><img width=11 height=11 id="_x0000_i1031"
src="cid:image001.gif@01C864E2.5951F8F0" class="skype_tb_img_adge"></span></span></span>
<br>
OpenSerDomain: jabber.splendor.net <br>
<br>
<br>
U +0.289348 PSTN.GW.IP.IP:5060 -&gt; 193.237.226.252:5060 <br>
SIP/2.0 404 Not Found . <br>
Via: SIP/2.0/UDP 193.237.226.252;rport;branch=z9hG4bK6828.10c0315.0. <br>
Via: SIP/2.0/UDP 192.168.0.176:65068;received=193.227.186.146;branch=z9hG4bK-d87543-be62c55d821be10d-1--d87543-;rport=65068.
<br>
Record-Route: &lt;sip:193.237.226.252;lr=on&gt;. <br>
From: &quot;ssafass&quot; &lt;sip:ali@jabber.splendor.net&gt;;tag=f36d6608. <br>
To: &quot;<span fn_index=1 info="Call +9613041705;1;+9613041705;1;" onmouseup="SetCallButtonPressed(this, 0,1)"
onmousedown="SetCallButtonPressed(this, 1,1)"
onmouseover="SetCallButton(this, 1,1);skype_active=CheckCallButton(this);"
onmouseout="SetCallButton(this, 0,1);HideSkypeMenu();" context=009613041705 rtl=false
id="__skype_highlight_id"><span
title="This is a Lebanon phone number. The country code cannot be changed."
onclick="javascript:if(0){doRunCMD(event, 'chdial','1');}else{doRunCMD(event, 'call','+9613041705');}event.preventBubble();return false;"
onmouseout="SetCallButtonPart(this, 0);"
onmouseover="SetCallButtonPart(this, 1);" id="__skype_highlight_id_left"><span
id="__skype_highlight_id_left_adge"><img width=11 height=11 id="_x0000_i1032"
src="cid:image001.gif@01C864E2.5951F8F0" class="skype_tb_img_adge"></span><span
id="__skype_highlight_id_left_img"><img width=32 height=32 id="_x0000_i1033"
src="cid:image002.gif@01C864E2.5951F8F0" title="" class="skype_tb_img_flag"
name="skype_tb_img_f1"></span></span><span
title="Call this phone number in Lebanon with Skype: +9613041705" onclick="javascript:doRunCMD(event, 'call','+9613041705');event.preventBubble();return false;"
onmouseout="SetCallButtonPart(this, 0)" onmouseover="SetCallButtonPart(this, 1)"
id="__skype_highlight_id_right"><span id="__skype_highlight_id_innerText"><img
width=1 height=1 id="_x0000_i1034" src="cid:image003.gif@01C864E2.5951F8F0"
class="skype_tb_img_space"><img width=1 height=1 id="_x0000_i1035"
src="cid:image003.gif@01C864E2.5951F8F0" class="skype_tb_img_space"><img
width=1 height=1 id="_x0000_i1036" src="cid:image003.gif@01C864E2.5951F8F0"
class="skype_tb_img_space"><img width=1 height=1 id="_x0000_i1037"
src="cid:image003.gif@01C864E2.5951F8F0" class="skype_tb_img_space"><span
class=skypetbinnertext>009613041705</span></span><span
id="__skype_highlight_id_right_adge"><img width=11 height=11 id="_x0000_i1038"
src="cid:image001.gif@01C864E2.5951F8F0" class="skype_tb_img_adge"></span></span></span>&quot;
<b><span style='font-weight:bold'>&lt;sip:009613041705@jabber.splendor.net&gt;;tag=GR52RWG346-34.</span></b>
<br>
Call-ID: 0942e159a72eab40ZmViZWY4YTVlOTRlOGJmZTM5ZDdkZGJiZjFmMTlmMjk.. <br>
CSeq: 1 INVITE. <br>
Contact: &quot;0000&quot; &lt;sip:PSTN.GW.IP.IP:5060&gt;. <br>
User-Agent: eyeBeam release 1003s stamp 31159. <br>
Content-Length: 0. <br>
<br>
I did a siptrace on the interface of the SIP proxy <br>
<br>
<a href="http://www.voipuser.org/ship_to.php?url=http://pastebin.com/d56426d63"
target="_blank"><!-- m -->http://pastebin.com/d56426d63</a><!-- m --> <br>
<br>
This is my config: <br>
<br>
<a href="http://www.voipuser.org/ship_to.php?url=http://pastebin.com/m128ca16e"
target="_blank"><!-- m -->http://pastebin.com/m128ca16e</a><o:p></o:p></span></font></p>

<!-- m -->

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<!-- Begin PNphpBB2 Attachment Mod --></div>

</body>

</html>