[Asterisk-Users] Group=????

Tim Burt asterisk-list at timburt.com
Mon Feb 7 09:41:31 MST 2005


I had a similar dilema just a day ago.

I wanted to know which number a user had dialed, when they entered my
system.  NOT their number, the number they dialed.

It appears that Asterisk can easily know the number that was dialed, but
does not record it into any variables, at least not reliably.

The trick is to setup a pattern that matches the inbound number.

If the number dialed is:  212-555-1212

Then a pattern of:

exten => 2125551212,1,Macro(housenum)

Will ID that the call came in on that number.

Then it is up to you to set a variable in the macro "housenum"
that will tell you later, that this call belongs to group 1.

I hope this helps...

> Good Day list,
>
> 	I have worn out my google toolbar today looking for a way to
> determine which group an incoming call belong to, but have not been very
> fruitfull in my endeavors.
>
> 	I am trying to figure a way to determine which group the
> incoming call that I just answered is part of so I can do some
> branchinbg scripts in my dialplan.  I know I can control my dialplan
> logic by creating separate context's for each channel type, however, I
> have some things that would be easier if I could just determine which
> group= setting the incoming call is on.
>
>        Example Zapata.conf:
>
>        context=from-pstn
>        signalling=fxs_ks
>        faxdetect=incoming
>        usecallerid=yes
>        echocancel=yes
>        echocancelwhenbridged=no
>        echotraining=800
>        group=0
>        channel=3
>
>
>        context=from-pstn
>        signalling=fxs_ks
>        faxdetect=incoming
>        usecallerid=yes
>        echocancel=yes
>        echocancelwhenbridged=no
>        echotraining=800
>        group=1
>        channel=4
>
>
> 	I would like to know if there is a variable or method to have
> set (For example $GROUP) such that
>
> 	Exten s,1,NoOp(${GROUP})
>
> 		Would display "0" if the call came in on channel 3 of my
> card
> 		And would display "1" if the call came in on channel 4
> of my card.
>
>
> Thanks for your time in this issue.
>
> Ron
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list