[asterisk-users] getting DID info..

Todd- Asterisk thouleasterisk at gleffsecurity.com
Fri Oct 20 15:59:44 MST 2006


Hi Eric- It wasn't typo, it was "truncated for posting"  :)  Below  
are the complete relevant files.   I'm getting 'S' when I want to  
hear the DID number..   This machine was a trixbox about a two weeks  
ago, but I've since tossed away the GUI and do everything by hand  
now.  I just used the trixbox for learning how this stuff works.  I  
want to have the DID in some variable so I can pass it to FOP for a  
popup and link to our web-based database...   I've used the free DID  
number from didww.com using IAX and SIP trunks.

If 's' is the correct extension, as I expect it is, how do I get the  
DID number that the call came in on?
   Todd


Log File during a call from an outside IAX line (form didww.com)
Oct 20 15:32:44 VERBOSE[5387] logger.c:     -- Accepting  
AUTHENTICATED call from 204.11.194.34:
        > requested format = ulaw,
        > requested prefs = (),
        > actual format = ulaw,
        > host prefs = (ulaw|alaw|gsm),
        > priority = mine
Oct 20 15:32:44 VERBOSE[9086] logger.c:     -- Executing Set 
("IAX2/204.11.194.34:4569-4", "LOOPCOUNT=0") in new stack
Oct 20 15:32:44 VERBOSE[9086] logger.c:     -- Executing NoOp 
("IAX2/204.11.194.34:4569-4", "8603492460") in new stack
Oct 20 15:32:44 VERBOSE[9086] logger.c:     -- Executing NoOp 
("IAX2/204.11.194.34:4569-4", "s") in new stack
Oct 20 15:32:44 VERBOSE[9086] logger.c:     -- Executing Wait 
("IAX2/204.11.194.34:4569-4", "1") in new stack
Oct 20 15:32:45 VERBOSE[9086] logger.c:     -- Executing SayAlpha 
("IAX2/204.11.194.34:4569-4", "s") in new stack
Oct 20 15:32:45 DEBUG[9086] channel.c: Scheduling timer at 160 sample  
intervals
Oct 20 15:32:45 VERBOSE[9086] logger.c:     -- Playing 'letters/ 
s' (language 'en')
Oct 20 15:32:45 DEBUG[5387] chan_iax2.c: Ooh, voice format changed to 4
Oct 20 15:32:46 DEBUG[9086] channel.c: Scheduling timer at 36 sample  
intervals
Oct 20 15:32:46 DEBUG[9086] channel.c: Scheduling timer at 0 sample  
intervals
Oct 20 15:32:46 DEBUG[9086] channel.c: Scheduling timer at 0 sample  
intervals
Oct 20 15:32:46 VERBOSE[9086] logger.c:     -- Executing Set 
("IAX2/204.11.194.34:4569-4", "TIMEOUT(digit)=3") in new stack
Oct 20 15:32:46 VERBOSE[9086] logger.c:     -- Digit timeout set to 3
Oct 20 15:32:46 VERBOSE[9086] logger.c:     -- Executing Set 
("IAX2/204.11.194.34:4569-4", "TIMEOUT(response)=4") in new stack
Oct 20 15:32:46 VERBOSE[9086] logger.c:     -- Response timeout set to 4
Oct 20 15:32:46 VERBOSE[9086] logger.c:     -- Executing BackGround 
("IAX2/204.11.194.34:4569-4", "custom/IsRecordedMsg") in new stack
Oct 20 15:32:46 DEBUG[9086] channel.c: Scheduling timer at 160 sample  
intervals
Oct 20 15:32:46 VERBOSE[9086] logger.c:     -- Playing 'custom/ 
IsRecordedMsg' (language 'en')
Oct 20 15:32:49 DEBUG[5387] chan_iax2.c: Immediately destroying 4,  
having received hangup
Oct 20 15:32:49 DEBUG[9086] channel.c: Scheduling timer at 0 sample  
intervals
Oct 20 15:32:49 VERBOSE[9086] logger.c:   == Spawn extension (ivr-2,  
s, 8) exited non-zero on 'IAX2/204.11.194.34:4569-4'
Oct 20 15:32:49 VERBOSE[9086] logger.c:     -- Executing Hangup 
("IAX2/204.11.194.34:4569-4", "") in new stack
Oct 20 15:32:49 VERBOSE[9086] logger.c:   == Spawn extension (ivr-2,  
h, 1) exited non-zero on 'IAX2/204.11.194.34:4569-4'
   -snip-


from IAX.conf
[didww]
username=didww
Secret=xxxx  (secret changed by todd)
Type=user
Host=204.11.194.34
Insecure=very
Context=ivr-2
;Context=from-trunk


from extensions_additional.conf
[ivr-2]
include => ivr-2-custom
include => ext-findmefollow
include => ext-local
include => app-directory
exten => h,1,Hangup
exten => s,1,Noop(${CALLERID})
exten => s,n,Noop(${EXTEN})
exten => s,n,Set(LOOPCOUNT=0)
exten => s,n,Set(__DIR-CONTEXT=default)
exten => s,n,Answer
;     exten => s,n,Set(DID=${EXTEN})
exten => s,n,Wait(1)
exten => s,n,SayAlpha(${EXTEN})
exten => s,n(begin),Set(TIMEOUT(digit)=3)
exten => s,n,Set(TIMEOUT(response)=4)
exten => s,n,Background(custom/IsRecordedMsg)
exten => hang,1,Playback(vm-goodbye)
exten => hang,n,Hangup
exten => t,1,Goto(ext-queues,200,1)
exten => i,1,Playback(invalid)
exten => i,n,Goto(loop,1)
exten => loop,1,Set(LOOPCOUNT=$[${LOOPCOUNT} + 1])
exten => loop,n,GotoIf($[${LOOPCOUNT} > 2]?hang,1)
exten => loop,n,Goto(ivr-2,,begin)
exten => fax,1,Goto(ext-fax,in_fax,1)

; end of [ivr-2]



On Oct 20, 2006, at 5:48 PM, Eric "ManxPower" Wieling wrote:
> There is no difference between an extension and a DID as far as  
> Asterisk is concerned.  You must have typoed the above example as  
> you do not have an exten => s,1
>
> When you do a exten => s,n,SayAlpha(${EXTEN}) the extension IS  
> "s".  If it was not "s" then it would never have gotten to that  
> extension.
> _______________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061020/9b12b069/attachment.htm


More information about the asterisk-users mailing list