[asterisk-users] Goto mask

Gabriel Ortiz Lour ortiz.admin at gmail.com
Mon Aug 17 12:36:57 CDT 2009


Soooorry!

   I'd should have searched befor asking, just found it on voip-info:

*From asterisk-1.4.20.1.tar.gz; docs/channelvariables.txt:*
${DNID} - Dialed Number Identifier (Deprecated; use
*${CALLERID<http://www.voip-info.org/wiki/view/Asterisk+func+callerid>
(dnid)}*)

*${CALLERID <http://www.voip-info.org/wiki/view/Asterisk+func+callerid>
(dnid)}* is the answer.



2009/8/17 Gabriel Ortiz Lour <ortiz.admin at gmail.com>

> Testing I have seen that there is data on the channel structure that tells
> me the dialed number even after the Goto:
>
>     -- Executing [1549 at ramais-internos:1] Goto("SIP/pa01-083308d0",
> "1249|1") in new stack
>     -- Goto (ramais-internos,1249,1)
>     -- Executing [1249 at ramais-internos:1] DumpChan("SIP/pa01-083308d0",
> "") in new stack
>
> Dumping Info For Channel: SIP/pa01-083308d0:
>
> ================================================================================
> Info:
> Name=               SIP/pa01-083308d0
> Type=               SIP
> UniqueID=           1250530124.12
> CallerID=           pa01
> CallerIDName=       ORTIZ
> DNIDDigits=         1549
> RDNIS=              (N/A)
> State=              Ring (4)
> Rings=              0
> NativeFormat=       0x4 (ulaw)
> WriteFormat=        0x4 (ulaw)
> ReadFormat=         0x4 (ulaw)
> 1stFileDescriptor=  21
> Framesin=           0
> Framesout=          0
> TimetoHangup=       0
> ElapsedTime=        0h0m0s
> Context=            ramais-internos
> Extension=          1249
> Priority=           1
> CallGroup=
> PickupGroup=
> Application=        DumpChan
> Data=               (Empty)
> Blocking_in=        (Not Blocking)
>
> Variables:
> SIPCALLID=VSvfc-RJp0u2f2 at 192.168.0.13
> SIPUSERAGENT=OP150S/1.45
> SIPDOMAIN=192.168.0.13
> SIPURI=sip:pa01 at 192.168.0.249:5060
>
> ================================================================================
>
>
> I've dialed 1549 and the Goto went to 1249, with DumpChan() I see that
> extension is now 1249, but on the field "DNIDDigits" I got the info that I
> need.
>
> Is there a way to retrieve this info on the dialplan? (I've tested with
> ${DNIDDigits}, no success...)
>
>
>
> 2009/8/17 Jim Dickenson <dickenson at cfmc.com>
>
>> will exten => _13[0-4]X,1,Goto(12${EXTEN:3},1) work for you?
>>  --
>> Jim Dickenson
>> mailto:dickenson at cfmc.com <dickenson at cfmc.com>
>>
>> CfMC
>> http://www.cfmc.com/
>>
>>
>>
>> On Aug 17, 2009, at 9:58 AM, Gabriel Ortiz Lour wrote:
>>
>> Hi all,
>>
>>   When I have 2 masks that would like to execute the same logic, there is
>> the way to use the Goto (or any other) command without changing the
>> ${EXTEN}?
>>
>> Eg. DID range is 1200-1349 -> call Macro(disca), what mask to use? (I just
>> got it with 2 masks, but I didn't wanted to duplicate the dialplan for both)
>>
>>
>> [test]
>> exten => _12XX,1,Set(DIR=3)
>> exten => _12XX,n,Set(GROUP(flux)=internal)
>> exten => _12XX,n,Macro(disca)
>>
>> exten => _13[0-4]X,1,Goto(1200,1)  ; what to put here to go to 12XX ??
>>
>> The example above would not work because it will try to call 1200 always
>> for the 13[0-4]X mask, since it will change the ${EXTEN} variable.
>>
>> thanks already,
>> Gabriel Ortiz
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
>> Register Now: http://www.astricon.net
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
>> Register Now: http://www.astricon.net
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090817/c92ec99a/attachment.htm 


More information about the asterisk-users mailing list