[asterisk-users] passing '302 moved temporarily' back to the SIP provider

Satish Barot satish4asterisk at gmail.com
Thu May 9 00:19:51 CDT 2013


On 5/9/13, Carlos Alvarez <carlos at televolve.com> wrote:
> On Tue, May 7, 2013 at 10:05 PM, Satish Barot
> <satish4asterisk at gmail.com>wrote:
>
>>
>>
>> promiscredir= yes in sip.conf should help you achieve your requirement.
>>
>
> I haven't been able to get that to work in a similar situation, except we
> are the provider.  It results in the new invite being from the CLID of the
> original caller, and fails.
>
>
> --
> Carlos Alvarez
> TelEvolve
> 602-889-3003
>
Completely misunderstood the OP!
Revised solution:
Set promiscredir= no in sip.conf. I assume you land your dids in
[incoming-trunk] and here is the basic dialplan tested on 11 but
should work on 1.8.

[incoming-trunk]
;-- Handle Incoming DIDs. Mine start with 89 and are of 4 digits --;
exten => _89XX,1,Noop(RDNIS=${CALLERID(rdnis)}::ANI=${CALLERID(ani)}::DNID=${CALLERID(dnid)})
same => n,Set(__ORIGCHANNEL=${CHANNEL})
same => n,Dial(SIP/${EXTEN},30)

;-- Dialplan to handle 302 Moved temporarily --;
exten => _X..,1,Noop(ORIGCHANNEL=${ORIGCHANNEL}::RDNIS=${CALLERID(rdnis)}::ANI=${CALLERID(ani)}::DNID=${CALLERID(dnid)}::CHANNELTYPE=${CHANNEL(channeltype)})
same => n,ExecIf($["${CALLERID(rdnis)}"!=""]?ChannelRedirect(${ORIGCHANNEL},back2provider,${EXTEN},1)
same => n,Hangup()

[back2provider]
;--Send 302 back to provider --;
exten => _X.,1,Transfer(${EXTEN})
same => n,NoOp(TRANSFERSTATUS=${TRANSFERSTATUS})
same => n,Hangup()

--Satish Barot
Ahmedabad, India



More information about the asterisk-users mailing list