[asterisk-users] ${BLINDTRANSFER}->accountcode ?

C F shmaltz at gmail.com
Sat Aug 12 20:40:48 MST 2006


I'll try :)
Lets say we are dealing with device a in sip.conf (sip/a), and sip/a
uses context a-outbound for dialing outbound:

[a-outbound]
exten => _1NXXNXXXXXX,1,Set(CDR(accountcode=1234)
exten => _1NXXNXXXXXX,2,Dial(whatever)

the above will make sure no matter what happens if sip/a transfer the
call it will do it thru this context, therefore the accountcode will
always be 1234.

Another way could be that the accountcode is the same as the sip
account in sip.conf, so lets say that the sip account is sip/1234, and
context is outbound:

[outbound]
exten => _1NXXNXXXXXX,1,GotoIf($[${LEN(${BLINDTRANSFER}>0]?50)
exten => _1NXXNXXXXXX,2,Dial(whatever)
exten => _1NXXNXXXXXX,50,Set(CDR(accountcode)=${BLINDTRANSFER:4:4})
exten => _1NXXNXXXXXX,51,Goto(2)
;this is so becuause blindtransfer contains the complete channel in
our case SIP/1234-abcd, so we make sure to remove the first 4 and use
the next 4, change it as needed.





On 8/11/06, Juan Pablo Abuyeres <jpabuyer at tecnoera.com> wrote:
> although a little example would be of great help here..
>
>
> On Fri, 2006-08-11 at 17:08 -0400, Juan Pablo Abuyeres wrote:
> > Ok, let's give it a try in Spanish please :)
> >
> >
> > On Fri, 2006-08-11 at 16:08 -0400, C F wrote:
> > > OK, just let me know what other language you want it in, I'm fluent in
> > > more than english, just let me know what language. For the rest use
> > > your creativity.
> > >
> > > On 8/11/06, Juan Pablo Abuyeres <jpabuyer at tecnoera.com> wrote:
> > > > I didn't understand :(
> > > >
> > > >
> > > > On Tue, 2006-08-08 at 17:31 -0400, C F wrote:
> > > > > Yes, if you see the blindxfer veriable has something in it, send it
> > > > > thru the same exten that the channel contained in blindxfer would go
> > > > > thru.
> > > > >
> > > > > On 8/8/06, Juan Pablo Abuyeres <jpabuyer at tecnoera.com> wrote:
> > > > > > When a call is blindtransferred, variable ${BLINDTRANSFER} indicates the
> > > > > > channel that blindtransfered the call. I need to get the accountcode of
> > > > > > that channel from the dialplan. Is there a way to do this?
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > --Bandwidth and Colocation provided by Easynews.com --
> > > > > >
> > > > > > asterisk-users mailing list
> > > > > > To UNSUBSCRIBE or update options visit:
> > > > > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > > > > >
> > > > > _______________________________________________
> > > > > --Bandwidth and Colocation provided by Easynews.com --
> > > > >
> > > > > asterisk-users mailing list
> > > > > To UNSUBSCRIBE or update options visit:
> > > > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > > >
> > > > _______________________________________________
> > > > --Bandwidth and Colocation provided by Easynews.com --
> > > >
> > > > asterisk-users mailing list
> > > > To UNSUBSCRIBE or update options visit:
> > > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > > >
> > > _______________________________________________
> > > --Bandwidth and Colocation provided by Easynews.com --
> > >
> > > asterisk-users mailing list
> > > To UNSUBSCRIBE or update options visit:
> > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list