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.
signature.asc
Description: OpenPGP digital signature
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users