Callback: No line on returning call, why?

With the help of a step by step manual I managed to set up Asterisk on a vServer and to configure it to my needs. This works now well.

Additionally I tried now also to add a callback. Someone told me how to do this, claiming that this would work on his Asterisk. Unfortunately it doesn’t on mine. I receive the returning call, but there is no line (no tone). Asterisk also doesn’t receive the destination number if I dial it without the tone. The person from whom I received the instruction couldn’t find out why it doesn’t work in my case. May be an Asterisk-expert in this forum can recognise the reason.

In my case the initial call is done to Sipcall (in CH); the actual telephone call is then done via Intervoip (in DE?).

I add below the different Asterisk-files and the output produced during such an excecise.

Has anyone an idea why I don’t receive the line?

Thanks
Marcel


sip.conf
********[code][general]
context=default
bindport=5060
bindaddr=77.xx.xx.xx
srvlookup=yes
useragent=MyDevice
disallow=all
allow=ulaw
allow=alaw
allow=ilbc

register => ID:Password@sip.intervoip.com/intervoip1

;Callback initial:
register => ID:Password@voipgateway.org/sipcall2

[intervoip1] ;for telephone call by callback
type=peer
username=ID
fromuser=ID
secret=Password
host=sip.intervoip.com
fromdomain=sip.intervoip.com
nat=yes
insecure=very
canreinvite=no
disallow=all
allow=alaw
allow=ulaw
allow=ilbc

[intervoip1_in]
type=peer
fromdomain=sip.intervoip.com
host=sip.intervoip.com
disallow=all
allow=ulaw
allow=alaw
allow=ilbc
context=incoming

[sipcall2] ;for initiating callback
username=4xxxxxxxxxx
fromuser=4xxxxxxxxxx
secret=Password
host=voipgateway.org
fromdomain=voipgateway.org
nat=yes
insecure=very
type=peer

[sipcall2_in]
type=peer
fromdomain=voipgateway.org
host=voipgateway.org
disallow=all
allow=ulaw
allow=alaw
context=incoming
[/code]


extensions.conf
***************[code][general]
static=yes
writeprotect=no

[macro-ruf]
;functions ok

[echotest]
;functions ok

[mailbox]
;functions ok

[mailbox_own]
;functions ok

[Local]
; SIP Extensions 30-39
exten => _3X,1,NoCDR()
exten => _3X,n,macro,ruf|SIP|${EXTEN}
; IAX Extension 40
exten => 40,1,NoCDR()
exten => 40,n,macro,ruf|IAX2|${EXTEN}

[outgoing_30_provider]
exten => _0.,1,Dial,SIP/${EXTEN}@sipcall1|45|r
exten => _*0.,1,Dial,SIP/${EXTEN:2}@sipcall1|45|r
exten => _*1.,1,Dial,SIP/${EXTEN:2}@netvoip1|45|r
; plus several others up to *9: functions ok

[outgoing_30_direct] ; Abbreviated numbers
exten => _#97,1,Dial,IAX2/ID@voipjet1/FriendA-Tel-Nr
; plus several others: ;functions ok

[outgoing_30_callback]
exten => _0.,1,Dial(SIP/${EXTEN}@intervoip1,60)

[incoming]
exten => sipcall1,1,macro,ruf|SIP|30
exten => 0xxxxxxxxx,1,macro,ruf|SIP|30 ; NetVoip1
exten => intervoip1,1,macro,ruf|SIP|30
; plus several others: functions ok
; note that there are 2 sipcall accounts, only sipcall2 is used for callback

;Callback for this number only:
exten => sipcall2/00yyyyyyyyyyyy,1,Macro(callfile,${CALLERID(num)})

[macro-callfile]
exten => s,1,system(echo ‘Channel: Local/${ARG1}@outgoing_30_callback’ > /var/spool/asterisk/${ARG1})
exten => s,n,system(echo ‘Context: callback’ >> /var/spool/asterisk/${ARG1})
exten => s,n,system(echo ‘Extension: s’ >> /var/spool/asterisk/${ARG1})
exten => s,n,system(echo ‘MaxRetries: 1’ >> /var/spool/asterisk/${ARG1})
exten => s,n,system(echo ‘RetryTime: 5’ >> /var/spool/asterisk/${ARG1})
exten => s,n,system(echo ‘WaitTime: 20’ >> /var/spool/asterisk/${ARG1})
exten => s,n,system(mv /var/spool/asterisk/${ARG1} /var/spool/asterisk/outgoing/)
exten => s,n,Busy

[callback]
exten => s,1,Answer()
exten => s,n,DISA(no-password,default)
exten => s,n,Hangup

[default]
include => Local
include => echotest
include => mailbox
include => mailbox_own

[app30]
include => default
include => outgoing_30_provider
include => outgoing_30_direct
include => outgoing_30_callback
[/code]


Output Asterisk
***************vs8709*CLI> -- Executing [sipcall2@incoming:1] Macro("SIP/212.117.200.148-f6faa0d0", "callfile|00yyyyyyyyyyyy") in new stack -- Executing [s@macro-callfile:1] System("SIP/212.117.200.148-f6faa0d0", "echo Channel: Local/00yyyyyyyyyyyy@outgoing_30_callback > /var/spool/asterisk/00yyyyyyyyyyyy") in new stack -- Executing [s@macro-callfile:2] System("SIP/212.117.200.148-f6faa0d0", "echo Context: callback >> /var/spool/asterisk/00yyyyyyyyyyyy") in new stack -- Executing [s@macro-callfile:3] System("SIP/212.117.200.148-f6faa0d0", "echo Extension: s >> /var/spool/asterisk/00yyyyyyyyyyyy") in new stack -- Executing [s@macro-callfile:4] System("SIP/212.117.200.148-f6faa0d0", "echo MaxRetries: 1 >> /var/spool/asterisk/00yyyyyyyyyyyy") in new stack -- Executing [s@macro-callfile:5] System("SIP/212.117.200.148-f6faa0d0", "echo RetryTime: 5 >> /var/spool/asterisk/00yyyyyyyyyyyy") in new stack -- Executing [s@macro-callfile:6] System("SIP/212.117.200.148-f6faa0d0", "echo WaitTime: 20 >> /var/spool/asterisk/00yyyyyyyyyyyy") in new stack -- Executing [s@macro-callfile:7] System("SIP/212.117.200.148-f6faa0d0", "mv /var/spool/asterisk/00yyyyyyyyyyyy /var/spool/asterisk/outgoing/") in new stack -- Executing [s@macro-callfile:8] Busy("SIP/212.117.200.148-f6faa0d0", "") in new stack == Spawn extension (macro-callfile, s, 8) exited non-zero on 'SIP/212.117.200.148-f6faa0d0' in macro 'callfile' == Spawn extension (macro-callfile, s, 8) exited non-zero on 'SIP/212.117.200.148-f6faa0d0' -- Attempting call on Local/00yyyyyyyyyyyy@outgoing_30_callback for s@callback:1 (Retry 1) -- Executing [00yyyyyyyyyyyy@outgoing_30_callback:1] Dial("Local/00yyyyyyyyyyyy@outgoing_30_callback-3098,2", "SIP/00yyyyyyyyyyyy@intervoip1|60") in new stack -- Called 00yyyyyyyyyyyy@intervoip1 -- SIP/intervoip1-081ed718 is making progress passing it to Local/00yyyyyyyyyyyy@outgoing_30_callback-3098,2 -- Got SIP response 486 "Busy here" back from 194.221.62.198 -- SIP/intervoip1-081ed718 is busy == Everyone is busy/congested at this time (1:1/0/0) == Auto fallthrough, channel 'Local/00yyyyyyyyyyyy@outgoing_30_callback-3098,2' status is 'BUSY' > Channel Local/00yyyyyyyyyyyy@outgoing_30_callback-3098,1 was never answered. -- Attempting call on Local/00yyyyyyyyyyyy@outgoing_30_callback for s@callback:1 (Retry 2) -- Executing [00yyyyyyyyyyyy@outgoing_30_callback:1] Dial("Local/00yyyyyyyyyyyy@outgoing_30_callback-2097,2", "SIP/00yyyyyyyyyyyy@intervoip1|60") in new stack -- Called 00yyyyyyyyyyyy@intervoip1 -- SIP/intervoip1-081ed718 is making progress passing it to Local/00yyyyyyyyyyyy@outgoing_30_callback-2097,2 -- SIP/intervoip1-081ed718 answered Local/00yyyyyyyyyyyy@outgoing_30_callback-2097,2 > Channel Local/00yyyyyyyyyyyy@outgoing_30_callback-2097,1 was answered. -- Executing [s@callback:1] Answer("Local/00yyyyyyyyyyyy@outgoing_30_callback-2097,1", "") in new stack -- Executing [s@callback:2] DISA("Local/00yyyyyyyyyyyy@outgoing_30_callback-2097,1", "no-password|default") in new stack == Spawn extension (outgoing_30_callback, 00yyyyyyyyyyyy, 1) exited non-zero on 'Local/00yyyyyyyyyyyy@outgoing_30_callback-2097,2' == Spawn extension (callback, s, 2) exited non-zero on 'Local/00yyyyyyyyyyyy@outgoing_30_callback-2097,1' vs8709*CLI>

The bug could finally be located here:

[callback] exten => s,1,Answer() exten => s,n,DISA(no-password,default) exten => s,n,Hangup
Asterisk doesn’t seem to be able to recognise in DISA the DTMF-tone when the returning call is accepted and therefore doesn’t provide the line.

This seem to be a bug in DISA itself. I’m using Asterisk 1.4.

A work-around could be found by adding an Authenticate-command just before the DISA-command:

[callback] exten => s,1,Answer() exten => s,n,Authenticate,1234||4 exten => s,n,DISA(no-password,outgoing_30_callback) exten => s,n,Hangup
After entering the password, the line is provided.

I hope this helps others who also try to implement a callback on their Asterisk.

Marcel

P.S: Note that I also had to correct in DISA the outgoing part
which wasn’t in default but in outgoing_30_callback, but this alone didn’t solve the observed issue with DISA.