[Freeswitch-users] Call Forwarding Problem
Mike
motosota at gmail.com
Wed Sep 22 05:59:59 PDT 2010
Hi,
Here's a problem I posted about on the IRC some time ago - I said I'd
do some traces and put them in pastebin, which I've done here:
http://pastebin.freeswitch.org/13970
A brief description of the problem and the calls involved in the pastebin.
Incoming calls are delivered to the Freeswitch from a SIP trunking
provider who are also used to route outgoing calls. This is not via a
gateway.
The SIP trunking provider insists that for outgoing calls, the data in
the "From" field in the INVITE message contains a PSTN number that
they have 'associated' with the SIP trunking service,
e.g.
From: "Zoltan" <sip:02031375892 at 79.125.110.116> is OK.
From: "Zoltan" <sip:anonymous at 79.125.110.116> would be rejected by
them, as would
From: "Zoltan" <sip:01344299800 at 79.125.110.116> as 01344299800 is
'someone elses' number, not one of theirs that they have allocated to
us.
The first call in the pastebin shows a Polycom phone making an
outgoing call that works / is allowed as the
effective_caller_id_number is set to an "allowed" number 02031375892.
The second call, starting at line 871 shows a call originating in the
PSTN from number 01344299800 to the Polycom. The SIP provider delivers
the call to the FreeSwitch which in turn sends the call to the
Polycom. The Polycom has been set to divert all incoming calls to
number 07770380800 and replies with a "SIP/2.0 302 Moved Temporarily"
with the forwarded to number as the contact. This in turn causes the
FreeSwitch to generate an INVITE message which is sent to the trunk
provider with:
From: "01344299800" <sip:01344299800 at 79.125.110.116> and
To: <sip:07770380800 at 79.125.4.174>
Since 01344299800 is not an "allowed" number according to the
provider, the call is rejected.
Putting aside the argument for now of whether the SIP provider should
be carrying out this rather brutal form of "CLI screening" (the data
in the 'From' field appears as the A Party Number / CLI once the call
hits the PSTN / mobile networks), is there any way to modify the
behaviour of this call so that in response to the "SIP/2.0 302 Moved
Temporarily" message, the INVITE which is sent out has the number from
the effective_caller_id_number variable for the forwarding extension,
rather than the number from the "From" field of the incoming invite?
Hope this makes sense,
Mike
More information about the FreeSWITCH-users
mailing list