[asterisk-users] want to add SipAddHeader in call out file
Mian M Asif
asif44pk at gmail.com
Fri Jan 16 09:01:45 CST 2009
Dear Alex Balashov and All others,
can anyone give me the example how i can add local/channel with out
call file which used for Callback, Below is my dialplan for Callback.
Need to know where i can add SipAddHeader() in below dialplan. I want
to add in call leg one.
exten => _X.,1,wait(1)
exten => _X.,2,Set(outCallerID=${exten:1})
exten => _X.,3,Busy(1)
exten => _X.,4,Hangup()
exten => h,1,GotoIf($["${InvalidUser}" = "1"]?20:2)
exten => h,2,DeadAGI(STD/STD-CBLeg1-RadAuth.pl|${SIP_HEADER(Call-ID)})
exten => h,3,Set(CALLERID(number)=${CALLERID(number)})
exten => h,4,System(echo channel:
SIP/${CallBackNo}@${LCR_TERMINATOR_STD} > /tmp/${CALLERID(number)})
exten => h,5,System(echo context: STD-callback-leg2 >> /tmp/${CALLERID(number)})
exten => h,6,System(echo extension: s >> /tmp/${CALLERID(number)})
exten => h,7,System(echo priority: 1 >> /tmp/${CALLERID(number)})
exten => h,8,System(echo callerid: ${outCallerID} >>
/tmp/${CALLERID(number)}) ; Your CallerID goes here
exten => h,9,System(echo maxretries: 0 >> /tmp/${CALLERID(number)})
exten => h,10,System(echo retrytime: 3 >> /tmp/${CALLERID(number)})
exten => h,11,System(echo Set: confID=${confID} >> /tmp/${CALLERID(number)})
exten => h,12,System(echo Set: calltime=${calltime} >> /tmp/${CALLERID(number)})
exten => h,13,System(echo Set: CallBackNo=${CALLERID(number)} >>
/tmp/${CALLERID(number)})
exten => h,14,System(echo Set: Leg1CallID=${Leg1CallID} >>
/tmp/${CALLERID(number)})
exten => h,15,System(echo sleep 5 > /tmp/${CALLERID(number)}.2)
exten => h,16,System(echo mv /tmp/${CALLERID(number)}
/var/spool/asterisk/outgoing >> /tmp/${CALLERID(number)}.2)
exten => h,17,System(chmod 775 /tmp/${CALLERID(number)}.2)
exten => h,18,System(/tmp/${CALLERID(number)}.2)
exten => h,19,NoOp(Hanging up ...!!)
exten => h,20,Hangup()
[STD-callback-leg2]
exten => s,1,NoOp(Entering callback-leg2)
exten => s,2,Set(CALLERID(number)=${CallBackNo})
;------ The Script Authorizes the user on Basis of Caller ID------------------
;------ Plays an IVR, gets destination Phno in SIP_Dest variable -------------
exten => s,3,Set(TIME_NOW=${EPOCH})
exten => s,4,DeadAGI(STD/STD-CBLeg2-RadAuthAcc.pl|${confID}|${calltime}|${TIME_NOW}|${SIP_HEADER(Call-ID)}|${Leg1CallID})
exten => s,5,hangup()
Regards,
Asif
Date: Fri, 16 Jan 2009 06:17:35 -0500
From: Alex Balashov <abalashov at evaristesys.com>
Subject: Re: [asterisk-users] want to add SipAddHeader in call out
file
To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users at lists.digium.com>
Message-ID: <49706CCF.8040506 at evaristesys.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Use a Local/ channel in the Originate command, which can punt the
outbound leg through dial plan logic that can call SipAddHeader() and
tack on the header.
Mian M Asif wrote:
> How to add SipAddHeader in outgoing call file.
> I am implementing a Callback scenario, in which a user makes a call to
> Local Access Number. The system have to callback to the user. During
> callback a call file is generated. All I want, is to add
> SipAddHeader("pchargingvector","val") in outgoing Invite.
> How can I achieve this?
>
>
> regards,
> Asif
More information about the asterisk-users
mailing list