[asterisk-users] How to change SIP header TO: ?
Paul Mancheno H.
pmancheno at gmail.com
Fri Jun 12 12:58:08 CDT 2020
Hello friends.
I have a softswitch in which I cannot create a list of blocked source
numbers; So, I have thought to use Asterisk and return a 302 message
when the number can make the call, my dialplan is as follows:
[from-external]
exten => _AX.,1,Verbose(=======> ${CALLERID(num)} to ${EXTEN})
same => n,Set(MYDESTINY=${REPLACE(${EXTEN},A,)})
same => n,Set(MYORIGIN=${CALLERID(num)})
same => n,Set(ITEXISTS=${ODBC_GETBLACKPHONE(${MYORIGIN})})
same => n,GotoIf($[${ITEXISTS}>0]?black)
; I will try to change header TO:
same => n,Set(MYHEADER=${PJSIP_HEADER(read,To)})
same => n,Set(MYnewHEADER=${REPLACE(MYHEADER,A,)})
same => n,Set(PJSIP_HEADER(update,To)=${MYnewHEADER})
; The previous block did not work because the INVITE message is not
sent altered
same => n,Transfer(PJSIP/sip:B${MYDESTINY}@10.1.1.2)
same => n,NoOp(Transferencia=${TRANSFERSTATUS})
same => n,Goto(end)
same => n(black),Verbose(Fraudulento)
same => n,Answer()
same => n,Playback(bye)
same => n,HangUp()
same => n(end),Verbose(Terminado)
What I need is to be able to change the TO: header so that the
softswitch receives the number without the prefix "A" because even
though the call is completed efficiently I am having trouble with the
billing (which belongs to the softswitch).
Please can you help me and tell me how I can change the header TO: of
the message "302" (sent by the Transfer method).
Cheers,
Pepo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200612/be78fa4d/attachment.sig>
More information about the asterisk-users
mailing list