Unable to do auto dial using SIP channel with Call files

Hi all,

I am using SIP connection to do outbound calls.

I am unable to do auto dial using SIP channel with Call files
I am creating call files like below.

Channel: SIP/XXXXXXXXXX@tatasip
Callerid: XXXXXXXX (DID provided by SIP provider)
MaxRetries: 5
RetryTime: 300
WaitTime: 45
Context: IVR
Extension:1001
Priority: 1

tatasip config from sip.conf

[tatasip]
type=friend
disallow=all
allow=alaw
allow=ulaw
allow=g729
host=X.X.X.X ;this is tata SBC ip
dtmfmode=rfc2833
nat=no
canreinvite=no
context=tata

IVR context from my dialplan

[IVR]

exten=>s,1,Set(ODBC_SAVE_CDR()={clid},{src},{dst},{dcontext},{channel},{dstchannel},{lastapp},{lastdata},{start},{answer},{end},{duration},{billsec},{disposition},{amaflags},{accountcode},{uniqueid},{userfield},${sequence})

exten => s,n,Set(TIMEOUT(digit)=5)

exten => s,n,Set(TIMEOUT(response)=10)

;exten => s,n,Answer

exten => s,n,Wait(1)

exten => s,n,AMD()
exten => s,n,GotoIf([{AMDSTATUS}=HUMAN]?humn:mach)
exten => s,n(mach),WaitForSilence(1000)

exten => s,n,Background(./custom/Main_Menu)
exten => s,n,Read(NUMBER,1,3,3)
exten => s,n,verbose({NUMBER}) exten => s,n,Set(CDR(userfield)={NUMBER})
exten => s,n,GotoIf({CDR(userfield)} = 1?:one) exten => s,n,GotoIf({CDR(userfield)} = 2?:two)

exten => s,n(one),Playback(./vm-goodbye)
exten => s,n,Hangup()

exten => s,n(two),Playback(./vm-goodbye)
exten => s,n,Hangup()

exten => s,n(humn),WaitForSilence(1000)
exten => s,n,Background(./custom/Main_Menu)
exten => s,n,Read(NUMBER,1,3,3)
exten => s,n,verbose({NUMBER}) exten => s,n,Set(CDR(userfield)={NUMBER})
exten => s,n,GotoIf({CDR(userfield)} = 1?:one) exten => s,n,GotoIf({CDR(userfield)} = 2?:two)
exten => 1,1,Playback(./vm-goodbye)
exten => 1,n,Hangup()

exten => 2,1,Playback(./vm-goodbye)
exten => 2,n,Hangup()

You haven’t actually stated what happens or what is going wrong, so you’ll need to provide that before anyone can help. Console output would also be useful.

@jcolp,

Thank you for quick response.

Please find below console output.

– Attempting call on SIP/9493634373@tatasip for s@IVR:1 (Retry 1)
== Using SIP RTP CoS mark 5
– Called 9493634373@tatasip
[Mar 15 23:37:44] WARNING[18617]: chan_sip.c:24061 handle_response_invite: Received response: “Forbidden” from ‘sip:9493634373@10.51.160.42;tag=as3faf6b61’
[Mar 15 23:37:44] NOTICE[18719]: pbx_spool.c:447 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)

10.51.160.42 is my server IP given by service provider.

I am able to do outbound calls using SIP client application.

That endpoint has sent back a Forbidden to the call attempt. You would need to determine why that is. For example the configuration in Asterisk may not be correct - but what it should be depends on what the remote side expects.

@jcolp,

Which endpoint.

I am able to do outbound calls using SIP client application.

The host configured in “tatasip” rejected the call attempt. That is what I meant by endpoint.

@jcolp,

Now I am getting below error.

– Attempting call on SIP/9493634373@tatasip for s@IVR:1 (Retry 1)
== Using SIP RTP CoS mark 5
– Called 9493674572@tatasip
– SIP/tatasip-00000002 is busy
[Mar 16 00:20:05] NOTICE[19763]: pbx_spool.c:447 attempt_thread: Call failed to go through, reason (5) Remote end is Busy

Find out why you re getting a busy replied sip set debug peer tatasip