Getting an "s" as called number

I am using iaxmodem to receive faxes and need to get the DID that was dialed. I just get an “s” instead of the number. System info: TB2.x, Centos 4, FreePBX 2.3, Asterisk 1.2.24.

That will have to be incorporated in how you are dialing your iaxmodem. What you basically want is something that looks like iax/iaxmodem1/${FROM_DID} for your dialstring how ever you configured it.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

OK, I added that to the end of the dial command in the extension that is setup for my iax modem. Now I get this.

     Quality: Normal
        Size: North American Letter
    Received: 2007:09:19 14:20:43

Time To Receive: 0:57
Signal Rate: 14400 bit/s
Data Format: 2-D MMR
Error Correct: Yes
CallID1: +1651xxxxxxx
CallID2: xxxxxxxxx
CallID3:
CallID4: ${FROM_DID}
Received On: ttyIAX0

it’s going to depend on how you configured your modem. You are making an iax call to iaxmodem and for any call if you want to pass the DID you need to put it at the end of the dial string. ${FROM_DID} happens to be where FreePBX keeps the DID so if placed in the right place it will get evaluated and translated.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

Ok, this is what I did. But it crashes Asterisk.

exten => +16516834014,1,Set(__FROM_DID=+16516834014)
exten => +16516834014,n,Gosub(app-blacklist-check,s,1)
exten => +16516834014,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => +16516834014,n,Set(CALLERID(name)=${CALLERID(num)})
exten => +16516834014,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => +16516834014,n,Set(FAX_RX=disabled)
exten => +16516834014,n,Dial(IAX/2000/${FROM_DID},20,d)
exten => +16516834014,n,Maco(hangupcall,)

exten => +16516834014,1,Set(__FROM_DID=+16516834014)
exten => +16516834014,n,Gosub(app-blacklist-check,s,1)
exten => +16516834014,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => +16516834014,n,Set(CALLERID(name)=${CALLERID(num)})
exten => +16516834014,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => +16516834014,n,Set(FAX_RX=disabled)
exten => +16516834014,n,Dial(IAX2/2000/${FROM_DID},60)
exten => +16516834014,n,Maco(hangupcall,)

-- Executing Set("SIP/4.68.250.148-b7a0f338", "__FROM_DID=+16516834014") in new stack
-- Executing Gosub("SIP/4.68.250.148-b7a0f338", "app-blacklist-check|s|1") in new stack
-- Executing LookupBlacklist("SIP/4.68.250.148-b7a0f338", "") in new stack
-- Executing GotoIf("SIP/4.68.250.148-b7a0f338", "0?blacklisted") in new stack
-- Executing Return("SIP/4.68.250.148-b7a0f338", "") in new stack
-- Executing GotoIf("SIP/4.68.250.148-b7a0f338", "1 ?cidok") in new stack
-- Goto (from-trunk,+16516834014,5)
-- Executing NoOp("SIP/4.68.250.148-b7a0f338", "CallerID is "xxxxxx " <+1651xxxxxxx>") in new stack
-- Executing Set("SIP/4.68.250.148-b7a0f338", "FAX_RX=disabled") in new stack
-- Executing Dial("SIP/4.68.250.148-b7a0f338", "IAX2/2000/+16516834014|60") in new stack
-- Called 2000/+16516834014
-- Call accepted by 192.168.173.244 (format ulaw)
-- Format for call is ulaw
-- IAX2/2000-3 is ringing
-- IAX2/2000-3 answered SIP/4.68.250.148-b7a0f338
-- Hungup 'IAX2/2000-3'

== Spawn extension (from-trunk, +16516834014, 7) exited non-zero on ‘SIP/4.68.250.148-b7a0f338’

exten => 4006,n(DIALGRP),Macro(dial,60,${DIAL_OPTIONS},4001-4003-4103)