[Asterisk-Users] Asterisk DNID/RDNIS with Dial iax2

Steve Totaro stotaro at asteriskhelpdesk.com
Fri Apr 28 18:24:09 MST 2006


I am not sure if it works but if you construct your iax.conf to include 
a [slave] section there is an option (sendani=yes I believe) but then 
your dial statement would not include IP and credentials, just 
Dial(IAX2/SLAVE/${EXTEN})

Isn't the ${EXTEN} variable being received on your slave box the info 
you are looking for?  How using setvar to set RDNIS to the EXTEN value?

Andrew wrote:
> Dear Asterisk-Users:
>
> Question:
> ========
>
> How do I get asterisk to pass DNID/RDNIS information between 
> asterisk machines using iax2, in a Dial(IAX2...) command ?
>
> Setup:
> =====
>
>   I have two asterisk boxes, MASTER and SLAVE.  MASTER is running
> 1.2.0 and SLAVE is running 1.2.1.  The main box handles incoming calls
> on a multiple lines (both via hardware connection to our internal PBX
> and calls forwarded to us by our IAX provider).
>
>   Based on a dialed extension, users are passed to a SLAVE asterisk 
> box.  extensions.conf on the MASTER includes a line like the following 
> to forward via iax2 to the SLAVE box at 10.23.1.43:
>
>   exten => _777XXXXX,2,Dial(IAX2/guest at 10.23.1.43/${EXTEN})
>
>   I would like to run and store statistics on the SLAVE box based on
> the original number dialed by the user. (Did they dial one of the
> local numbers, or the 1-800 number, etc.) MASTER has this number store
> in ${DNID}.
>
>   However, this doesn't get passed onto the SLAVE server.  Watching a
> tcpdump between MASTER and SLAVE, I see neither the DNID nor RDNIS
> IE element passed on the wire.
>
> I see these IEs on the wire:
>     Protocol version
>     Number/extension being called
>     codec negotiation
>     calling number
>     calling presentation
>     calling type of number
>     calling tansit network select
>     Name of caller
>     desired languate
>     username (peer or user) for authentication
>     Desired coded format
>     Actual codec capability
>     CPE ADSI capability
>     Date/Time
>
>   Neither ${RDNIS} nor ${DNID} is defined when queried on the SLAVE
> extensions.conf.
>
>   I found this note at voip-info, and don't fully understand it,
> but it seems to imply that this isn't going to work?
>
> http://www.voip-info.org/wiki/view/RDNIS
> Asterisk note
> | Asterisk only supports RGN, and at that, it's wrongly placed in
> | the channel's Caller*ID information. The RGN can be set or
> | retrieved using the CALLERID(rdnis) function, such as
> | Set(CALLERID(rdnis)=5551212). The Dial application also sets the
> | RGN to the current extension, unless called within a macro, in which
> | case the contents of ${MACRO_EXTEN} are used instead. This overwrites
> | anything else set within the dialplan, which may not be what a dialplan
> | author would expect. Although IAX2 supports RGN in IE 27 (actually
> | misnamed RDNIS), it does not appear to be properly passed to a peer
> | when placing outgoing calls.
>
>   Do I need to modify the sources (chan_iax2?) to populate and pass the 
> RDNIS IE from MASTER to SLAVE?  Or maybe this is as simple as passing a 
> magic flag to the dial command?
>
> Thanks for any hints or tips you can pass my way,
> Andrew
>
> ----
> Reach Beyond the Classroom  -- Horizon Wimba -- www.horizonwimba.com
> Andrew Grangaard
> andrew-asteriskusers at horizonlive.com
> _______________________________________________
> --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