Outgoing call with my sip provider

Hi,

I am making an outgoing call using the version Asterisk-1.4.12 for my ivr application to work. I got registered my sip account with bandtel and configured the same on my sip.conf file. Find below my sip.conf file details.

Is that iam missing something here.

[bandtel]
type=peer
secret=xxxxxx                    //as given by bandtel
username=2068xxxx01       //as given by bandtel 
host=10.1.1.68                   //my ip address of the system
fromuser=2068xxxx01        //as given by bandtel
fromdomain=proxy1.bandtel.com    //outgoing call sent to the proxy    address, given by bandtel
canreinvite=no
insecure=very
qualify=yes
nat=yes
context=dialout

Once when i try to call the pstn number, i get the following error:

Called 16305484800@bandtel -- Got SIP response 482 "Loop Detected" back from 10.1.1.68 -- Now forwarding Local/outbound@dialout-f680,1 to 'Local/16305484800@dialout' (thanks to SIP/bandtel-0877dcf0) [Nov 14 13:21:48] NOTICE[16961]: chan_local.c:570 local_alloc: No such extension/context 16305484800@dialout creating local channel [Nov 14 13:21:48] NOTICE[16961]: app_dial.c:507 wait_for_answer: Unable to create local channel for call forward to 'Local/16305484800@dialout' (cause = 0) [Nov 14 13:21:48] NOTICE[16961]: cdr.c:434 ast_cdr_free: CDR on channel 'SIP/bandtel-0877dcf0' not posted == Everyone is busy/congested at this time (1:0/0/1)

Can anyone please let me know what is the solution to this. Are my syntax in the sip.conf file correct.

Appreciate your response.

Regards,
Naveen

hi
i think solution is host= ur provider server or softswtich ip address
not ur Asterisk server ip address so correct it. also mat be need register=> paramters , but first try with host. all other are ok
try this it will help you.

Amit

Yeah that was the problem i solved it. the host should be my proxy server for outgoing calls of the sip provider. Thanks for the help amit.

Hi,

I hope you can help me on this. The outbound call placed does well with my softphone (xlite), but when i am using bandtel (Service provider) the call gets established to my mobile phone and when picked the call could not get the audio.

Extract from my asterisk is as shown for differenct scenario’s:

  1. When i use my softphone, you can see the lines in bold which says its ringing and later answered.

Attempting call on Local/outbound@dialout for outbound-handler@dialout:1 (Retry 1)
– Executing [outbound@dialout:1] Answer(“Local/outbound@dialout-2211,2”, “”) in new stack
– Executing [outbound@dialout:2] Wait(“Local/outbound@dialout-2211,2”, “20”) in new stack
– Executing [outbound-handler@dialout:1] Dial(“Local/outbound@dialout-2211,1”, “SIP/102|40|gM(outbound-connect^agi://10.1.1.68/ivr/speak^—+%0Aname%3A+sanchu%0Aid%3A+1%0A^)”) in new stack
– Called 102
– SIP/102-b75005c0 is ringing
– SIP/102-b75005c0 answered Local/outbound@dialout-2211,1
– Executing [s@macro-outbound-connect:1] Answer(“SIP/102-b75005c0”, “”) in new stack
– Executing [s@macro-outbound-connect:2] NoOp(“SIP/102-b75005c0”, “status=”) in new stack

– Executing [s@macro-outbound-connect:3] Set(“SIP/102-b75005c0”, “CallInitiate_hashdata=—+%0Aname%3A+sanchu%0Aid%3A+1%0A”) in new stack
– Executing [s@macro-outbound-connect:4] Set(“SIP/102-b75005c0”, “machinestatus=”) in new stack
– Executing [s@macro-outbound-connect:5] AGI(“SIP/102-b75005c0”, “agi://10.1.1.68/ivr/speak”) in new stack
– AGI Script Executing Application: (AGI) Options: (swift.agi|Hi Bhaskar, Welcome to the IVR world. sample Message. This is a reminder set up.)

  1. When i use bandtel to connect to my mobile phone number:

– Attempting call on Local/outbound@dialout for outbound-handler@dialout:1 (Retry 1)
– Executing [outbound@dialout:1] Answer(“Local/outbound@dialout-7829,2”, “”) in new stack
– Executing [outbound@dialout:2] Wait(“Local/outbound@dialout-7829,2”, “20”) in new stack
– Executing [outbound-handler@dialout:1] Dial(“Local/outbound@dialout-7829,1”, “SIP/011919960466622@bandtel_Proxy_Server|40|gM(outbound-connect^agi://10.1.1.68/ivr/speak^—+%0Aname%3A+sanchu%0Aid%3A+1%0A^)”) in new stack
– Called 011919960466622@bandtel_Proxy_Server
– SIP/proxy1.bandtel.com-b7500b48 is making progress passing it to Local/outbound@dialout-7829,1
– SIP/proxy1.bandtel.com-b7500b48 is ringing
– SIP/proxy1.bandtel.com-b7500b48 is making progress passing it to Local/outbound@dialout-7829,1
– Executing [outbound@dialout:3] NoOp(“Local/outbound@dialout-7829,2”, “”) in new stack

– Executing [outbound@dialout:4] AGI(“Local/outbound@dialout-7829,2”, “agi://10.1.1.68/ivr/unanswered”) in new stack
– AGI Script agi://10.1.1.68/ivr/unanswered completed, returning 0
– Executing [outbound@dialout:5] Hangup(“Local/outbound@dialout-7829,2”, “”) in new stack
== Spawn extension (dialout, outbound, 5) exited non-zero on ‘Local/outbound@dialout-7829,2’
[Nov 19 04:31:34] NOTICE[13370]: cdr.c:434 ast_cdr_free: CDR on channel ‘SIP/proxy1.bandtel.com-b7500b48’ not posted
== Spawn extension (dialout, outbound-handler, 1) exited non-zero on ‘Local/outbound@dialout-7829,1’
[Nov 19 04:31:34] NOTICE[13370]: pbx_spool.c:351 attempt_thread: Call completed to Local/outbound@dialout

From the above two scenario you can compare the lines in bold when i connect to softphone and when i connect to my mobile phone where it executes the swift.agi in the former and it gives unanswered at the latter case.

My dialplan is as given below:

[dialout]
exten => outbound,1,Answer ; switches to outbound-handler
exten => outbound,2,Wait(20)
exten => outbound,3,NoOp(${DIALSTATUS})
exten => outbound,4,AGI(agi://10.40.5.40/ivr/unanswered)
exten => outbound,6,Hangup

exten => outbound-handler,1,Dial(SIP/${CallInitiate_phonenumber}@bandtel_Proxy_Server,40,gM(outbound-connect^agi://10.40.5.40/ivr/speak^${CallInitiate_hashdata}^${MACHINE_STATUS_UNKNOWN}))
exten => outbound-handler,2,GotoIf($[${DIALSTATUS} = CONGESTION]?105)
exten => outbound-handler,3,NoOp(status=${DIALSTATUS}, DIALEDTIME=${DIALEDTIME},ANSWEREDTIME=${ANSWEREDTIME})
exten => outbound-handler,4,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?107)
exten => outbound-handler,5,GotoIf($[${DIALSTATUS} = ANSWER]?101)
exten => outbound-handler,6,Set(CallInitiate_hashdata=${CallInitiate_hashdata}) ;DIAL_STATUS is busy, etc.
exten => outbound-handler,7,Goto(104)
exten => outbound-handler,101,AGI(agi://10.40.5.40/ivr/disconnected)
;exten => outbound-handler,102,Set(CallInitiate_hashdata=${CallInitiate_hashdata})
;exten => outbound-handler,103,AGI(agi://${AGI_SERVER}${AGI_URL}) ;DIAL_STATUS is busy, etc.
exten => outbound-handler,104,Hangup
exten => outbound-handler,105,AGI(agi://10.40.5.40/ivr/ignored)
exten => outbound-handler,107,AGI(agi://10.40.5.40/ivr/busy)

[macro-outbound-connect]
exten => s,1,Answer()
exten => s,2,NoOp(status=${DIALSTATUS})
exten => s,3,Set(CallInitiate_hashdata=${ARG2})
exten => s,4,Set(machinestatus=${ARG3})
exten => s,5,AGI(${ARG1})
exten => s,6,Hangup

Could you please let me know what is going wrong here that when i use my service provider the dialplan is not executing macro-outbound-connect.

Thanks and appreciate your response.[/code]