Mian M Asif
2009-Jan-16 11:13 UTC
[asterisk-users] want to add SipAddHeader in call out file
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
Alex Balashov
2009-Jan-16 11:17 UTC
[asterisk-users] want to add SipAddHeader in call out file
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 > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 Mobile : (+1) (678) 237-1775
Mian M Asif
2009-Jan-16 15:01 UTC
[asterisk-users] want to add SipAddHeader in call out file
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