Mike,<br><br>All of our redirect handling information is covered here:<br><a href="http://wiki.freeswitch.org/wiki/Dialplan_Handling_Incoming_Redirect">http://wiki.freeswitch.org/wiki/Dialplan_Handling_Incoming_Redirect</a><br>
<br>If I were you I would play around with the sip-related variables like sip_to_uri and sip_to_user when handling the 302 redirect from the Polycom. Let us know what you find out.<br><br>-MC<br><br><div class="gmail_quote">
On Wed, Sep 22, 2010 at 5:59 AM, Mike <span dir="ltr"><<a href="mailto:motosota@gmail.com">motosota@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
Here's a problem I posted about on the IRC some time ago - I said I'd<br>
do some traces and put them in pastebin, which I've done here:<br>
<br>
<a href="http://pastebin.freeswitch.org/13970" target="_blank">http://pastebin.freeswitch.org/13970</a><br>
<br>
A brief description of the problem and the calls involved in the pastebin.<br>
<br>
Incoming calls are delivered to the Freeswitch from a SIP trunking<br>
provider who are also used to route outgoing calls. This is not via a<br>
gateway.<br>
<br>
The SIP trunking provider insists that for outgoing calls, the data in<br>
the "From" field in the INVITE message contains a PSTN number that<br>
they have 'associated' with the SIP trunking service,<br>
e.g.<br>
From: "Zoltan" <<a href="mailto:sip%3A02031375892@79.125.110.116">sip:02031375892@79.125.110.116</a>> is OK.<br>
From: "Zoltan" <<a href="mailto:sip%3Aanonymous@79.125.110.116">sip:anonymous@79.125.110.116</a>> would be rejected by<br>
them, as would<br>
From: "Zoltan" <<a href="mailto:sip%3A01344299800@79.125.110.116">sip:01344299800@79.125.110.116</a>> as 01344299800 is<br>
'someone elses' number, not one of theirs that they have allocated to<br>
us.<br>
<br>
The first call in the pastebin shows a Polycom phone making an<br>
outgoing call that works / is allowed as the<br>
effective_caller_id_number is set to an "allowed" number 02031375892.<br>
<br>
The second call, starting at line 871 shows a call originating in the<br>
PSTN from number 01344299800 to the Polycom. The SIP provider delivers<br>
the call to the FreeSwitch which in turn sends the call to the<br>
Polycom. The Polycom has been set to divert all incoming calls to<br>
number 07770380800 and replies with a "SIP/2.0 302 Moved Temporarily"<br>
with the forwarded to number as the contact. This in turn causes the<br>
FreeSwitch to generate an INVITE message which is sent to the trunk<br>
provider with:<br>
From: "01344299800" <<a href="mailto:sip%3A01344299800@79.125.110.116">sip:01344299800@79.125.110.116</a>> and<br>
To: <<a href="mailto:sip%3A07770380800@79.125.4.174">sip:07770380800@79.125.4.174</a>><br>
<br>
Since 01344299800 is not an "allowed" number according to the<br>
provider, the call is rejected.<br>
<br>
Putting aside the argument for now of whether the SIP provider should<br>
be carrying out this rather brutal form of "CLI screening" (the data<br>
in the 'From' field appears as the A Party Number / CLI once the call<br>
hits the PSTN / mobile networks), is there any way to modify the<br>
behaviour of this call so that in response to the "SIP/2.0 302 Moved<br>
Temporarily" message, the INVITE which is sent out has the number from<br>
the effective_caller_id_number variable for the forwarding extension,<br>
rather than the number from the "From" field of the incoming invite?<br>
<br>
Hope this makes sense,<br>
<br>
Mike<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>