Page 1 of 1

Hangup after 10 secs (autodial =1)

PostPosted: Sat Sep 16, 2006 6:58 am
by gardo
When auto dialing is set to 0 we can call the leads and talk to them. If set to 1 - auto dial, the call is conected yet after 10 secs of picking up the phone it gets disconnected. Neither party can hear each other.

This is the output of asterisk cli:

== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'sendcron' logged on from 127.0.0.1
> Channel SIP/3001-0849a710 was answered.
-- Executing MeetMe("SIP/3001-0849a710", "8600071") in new stack
== Parsing '/etc/asterisk/meetme.conf': Found
-- Created MeetMe conference 1023 for conference '8600071'
-- Playing 'conf-onlyperson' (language 'en')
== Manager 'sendcron' logged off from 127.0.0.1
== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'sendcron' logged on from 127.0.0.1
-- Executing AGI("Local/639172491537@default-a4df,2", "call_log.agi|639172491537") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
+++++ CALL LOG START : |1158408624.3|Local/639172491537@default-a4df,2|639172491537|Local|V0916201024000000179|2006-09-16 20:10:24
-- AGI Script call_log.agi completed, returning 0
-- Executing Dial("Local/639172491537@default-a4df,2", "sip/639172491537@SIPtrunk|55|o") in new stack
-- Called 639172491537@SIPtrunk
-- SIP/SIPtrunk-084c1d08 is making progress passing it to Local/639172491537@default-a4df,2
-- SIP/SIPtrunk-084c1d08 answered Local/639172491537@default-a4df,2
> Channel Local/639172491537@default-a4df,1 was answered.
== Manager 'sendcron' logged off from 127.0.0.1
-- Executing AGI("Local/639172491537@default-a4df,1", "call_log.agi|8365") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
+++++ CALL LOG START : |1158408624.2|Local/639172491537@default-a4df,1|8365|Local|V0916201024000000179|2006-09-16 20:10:34
-- AGI Script call_log.agi completed, returning 0
-- Executing AGI("Local/639172491537@default-a4df,1", "agi-VDADtransfer.agi|8365") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDADtransfer.agi
Perl Environment Dump:
0|8365|
callerID changed: V0916201024000000179
AGI Environment Dump:
-- accountcode =
-- callerid = 0000000000
-- calleridname = V0916201024000000179
-- callingani2 = 0
-- callingpres = 0
-- callingtns = 0
-- callington = 0
-- channel = Local/639172491537@default-a4df,1
-- context = default
-- dnid = unknown
-- enhanced = 0.0
-- extension = 8365
-- language = en
-- priority = 2
-- rdnis = unknown
-- request = agi-VDADtransfer.agi
-- type = Local
-- uniqueid = 1158408624.2
AGI Environment Dump: |1158408624.2|Local/639172491537@default-a4df,1|8365|Local|V0916201024000000179|V0916201024000000179|2|

CALL RECEIVED IN FROM VDAD: V0916201024000000179 Local/639172491537@default-a4df,1 2
+++++ VDAD START : |1158408624.2|Local/639172491537@default-a4df,1|8365|Local|V0916201024000000179|179|2006-09-16 20:10:34||2|
+++++ VDAD START LOCAL CHANNEL: EXITING- 2
-- AGI Script agi-VDADtransfer.agi completed, returning 0
-- Executing AGI("Local/639172491537@default-a4df,1", "agi-VDADtransfer.agi|8365") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDADtransfer.agi
Perl Environment Dump:
0|8365|
callerID changed: V0916201024000000179
AGI Environment Dump:
-- accountcode =
-- callerid = unknown
-- calleridname = V0916201024000000179
-- callingani2 = 0
-- callingpres = 0
-- callingtns = 0
-- callington = 0
-- channel = Local/639172491537@default-a4df,1
-- context = default
-- dnid = unknown
-- enhanced = 0.0
-- extension = 8365
-- language = en
-- priority = 3
-- rdnis = unknown
-- request = agi-VDADtransfer.agi
-- type = Local
-- uniqueid = 1158408624.2
AGI Environment Dump: |1158408624.2|Local/639172491537@default-a4df,1|8365|Local|V0916201024000000179|V0916201024000000179|3|

CALL RECEIVED IN FROM VDAD: V0916201024000000179 Local/639172491537@default-a4df,1 3
+++++ VDAD START : |1158408624.2|Local/639172491537@default-a4df,1|8365|Local|V0916201024000000179|179|2006-09-16 20:10:34||3|
+++++ VDAD START LOCAL CHANNEL: EXITING- 3
-- AGI Script agi-VDADtransfer.agi completed, returning 0
-- Executing AGI("Local/639172491537@default-a4df,1", "agi-VDADtransfer.agi|8365") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDADtransfer.agi
Perl Environment Dump:
0|8365|
callerID changed: V0916201024000000179
AGI Environment Dump:
-- accountcode =
-- callerid = unknown
-- calleridname = V0916201024000000179
-- callingani2 = 0
-- callingpres = 0
-- callingtns = 0
-- callington = 0
-- channel = Local/639172491537@default-a4df,1
-- context = default
-- dnid = unknown
-- enhanced = 0.0
-- extension = 8365
-- language = en
-- priority = 4
-- rdnis = unknown
-- request = agi-VDADtransfer.agi
-- type = Local
-- uniqueid = 1158408624.2
AGI Environment Dump: |1158408624.2|Local/639172491537@default-a4df,1|8365|Local|V0916201024000000179|V0916201024000000179|4|

CALL RECEIVED IN FROM VDAD: V0916201024000000179 Local/639172491537@default-a4df,1 4
+++++ VDAD START : |1158408624.2|Local/639172491537@default-a4df,1|8365|Local|V0916201024000000179|179|2006-09-16 20:10:35||4|
+++++ VDAD START LOCAL CHANNEL: EXITING- 4
-- AGI Script agi-VDADtransfer.agi completed, returning 0
-- Executing Hangup("Local/639172491537@default-a4df,1", "") in new stack
== Spawn extension (default, 8365, 5) exited non-zero on 'Local/639172491537@default-a4df,1'
-- Executing DeadAGI("Local/639172491537@default-a4df,1", "call_log.agi|h") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
+++++ CALL LOG HUNGUP: |1158408624.2|Local/639172491537@default-a4df,1|h|2006-09-16 20:10:36|min: 0.03|
-- AGI Script call_log.agi completed, returning 0
-- Executing DeadAGI("Local/639172491537@default-a4df,1", "VD_hangup.agi|h") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/VD_hangup.agi
AGI Environment Dump:
-- accountcode =
-- callerid = unknown
-- calleridname = V0916201024000000179
-- callingani2 = 0
-- callingpres = 0
-- callingtns = 0
-- callington = 0
-- channel = Local/639172491537@default-a4df,1
-- context = default
-- dnid = unknown
-- enhanced = 0.0
-- extension = h
-- language = en
-- priority = 2
-- rdnis = unknown
-- request = VD_hangup.agi
-- type = Local
-- uniqueid = 1158408624.2
AGI Environment Dump: |1158408624.2|Local/639172491537@default-a4df,1|h|Local|V0916201024000000179|V0916201024000000179|2|

DEBUG:

VD_hangup : V0916201024000000179 Local/639172491537@default-a4df,1 2
+++++ VD hangup START : |1158408624.2|Local/639172491537@default-a4df,1|h|Local|V0916201024000000179|179|2006-09-16 20:10:36||2|V0916201024000000179|
-- VDhangup Local DEBUG: ||V0916201024000000179|||
+++++ VDAD START LOCAL CHANNEL: EXITING- 2
-- AGI Script VD_hangup.agi completed, returning 0
== Spawn extension (default, 639172491537, 2) exited non-zero on 'Local/639172491537@default-a4df,2'
-- Executing DeadAGI("Local/639172491537@default-a4df,2", "call_log.agi|h") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
+++++ CALL LOG HUNGUP: |1158408624.3|Local/639172491537@default-a4df,2|h|2006-09-16 20:10:36|min: 0.20|
-- AGI Script call_log.agi completed, returning 0
-- Executing DeadAGI("Local/639172491537@default-a4df,2", "VD_hangup.agi|h") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/VD_hangup.agi
AGI Environment Dump:
-- accountcode =
-- callerid = 0000000000
-- calleridname = V0916201024000000179
-- callingani2 = 0
-- callingpres = 0
-- callingtns = 0
-- callington = 0
-- channel = Local/639172491537@default-a4df,2
-- context = default
-- dnid = unknown
-- enhanced = 0.0
-- extension = h
-- language = en
-- priority = 2
-- rdnis = unknown
-- request = VD_hangup.agi
-- type = Local
-- uniqueid = 1158408624.3
AGI Environment Dump: |1158408624.3|Local/639172491537@default-a4df,2|h|Local|V0916201024000000179|V0916201024000000179|2|

DEBUG:

VD_hangup : V0916201024000000179 Local/639172491537@default-a4df,2 2
+++++ VD hangup START : |1158408624.3|Local/639172491537@default-a4df,2|h|Local|V0916201024000000179|179|2006-09-16 20:10:37||2|V0916201024000000179|
-- VDhangup Local DEBUG: ||V0916201024000000179|||
+++++ VDAD START LOCAL CHANNEL: EXITING- 2
-- AGI Script VD_hangup.agi completed, returning 0


Output of screen -r:

17855.ASTVDremote (Detached)
22740.ASTVDauto (Detached)
17725.ASTlisten (Detached)
17861.ASTupdate (Detached)
17716.ASTlisten (Detached)
17734.ASTsend (Detached)
3508.asterisk (Detached)

any help is greatly appreciated.

PostPosted: Sat Sep 16, 2006 8:40 am
by mflorell
This is a support topic, not general.

You need to make sure that your SIP trunk is registered in sip.conf, and then you need to use the same string that you used to register the account in the Dial string. For some reason in Asterisk if a call is not dialed in the exact same way as the account is register, the proper SIP channel will remain as a masq'd Local/ channel when the call is Originated as a Local/ channel as it is in VICIDIAL.

PostPosted: Sat Sep 16, 2006 9:02 am
by gardo
I noticed too late that I posted in the wrong room. Here's the register portion of my sip.conf:

register => user:password@ipaddress:5060
;
; setup account for SIP trunking:
[SIPtrunk]
disallow=all
allow=ulaw
allow=alaw
type=peer
username=user
secret=password
host=ipaddress
dtmfmode=inband
qualify=1000

This is the dial string that I have in extensions.conf:

;### OPTIONAL SIP trunk extensions entries for US long distance dialing over SIP
exten => _1NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
exten => _1NXXNXXXXXX,2,Dial(sip/${EXTEN}@SIPtrunk,55,o)
exten => _1NXXNXXXXXX,3,Hangup

What do you mean the same dial string I used to register? Should I put it like this:
exten => _1NXXNXXXXXX,2,Dial(sip/username:password@ipaddress:5060,55,o)

Thanks in advance.

PostPosted: Sat Sep 16, 2006 12:25 pm
by mflorell
You should define something like a "SIPdialout" global var at the top of the extensions.conf and use that instead of the sip.conf account name as you are now. For example, here is one of our examples from one of our systems:

extensions.conf:
[globals]
TRUNKSIPtest=VICItest:1234@10.10.10.16:5060

[default]
exten => _91NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
exten => _91NXXNXXXXXX,2,Dial(SIP/${EXTEN}@${TRUNKSIPtest},55,o)
exten => _91NXXNXXXXXX,3,Hangup


sip.conf:
[general]
register => VICItest:1234@10.10.10.16:5060

no register string

PostPosted: Sat Sep 16, 2006 1:21 pm
by espencer
My SIP provider uses IPs and static routes and gets upset if I use a register string. Is there a way to circumvent the register string?

thanks!

PostPosted: Sat Sep 16, 2006 8:17 pm
by mflorell
Not that I've been able to get working. Who is your provider?

PostPosted: Sat Sep 16, 2006 10:25 pm
by espencer
his name is vijay at voipinvite.com. he gave special deal to our users group:

http://utaug.org/?q=node/49

quality is very good as he routes the media stream to the nearest PSTN gateway.

my connection in sip.conf in its entirety looks like this:

[vj]
type=peer
progressinband=yes
host=209.120.202.94

PostPosted: Sun Sep 17, 2006 12:39 am
by mflorell
If you cannot register then I don't know how you will get around the limitations of how Local/ channels resolve to their proper channelnames in Asterisk.

I played around with this issue a lot two years ago and got nowhere. The answer is somethwhere in the code I just couldn't find it.

PostPosted: Sun Sep 17, 2006 12:56 am
by espencer
workaround could be two servers, maybe? kind of crazy but you could do a trunk with a register string to another server that just transcodes and talks to the provider. i guess if the savings are enough it might be justified.

PostPosted: Sun Sep 17, 2006 5:25 am
by mflorell
That could work actually, and not be that crazy since it could also function as a transcoding server if you plan on using G729, which would have the added bonus of lowering the load on your dialer CPU.

Re: no register string

PostPosted: Sun Sep 17, 2006 7:44 am
by gardo
espencer wrote:My SIP provider uses IPs and static routes and gets upset if I use a register string. Is there a way to circumvent the register string?

thanks!


Our sip provider also does this. They don't use any registration strings. They only allow our ip address to pass through their "sip gateway". I haven't made it to do outbound or inbound calls yet. Have you made it work yet?

PostPosted: Sun Sep 17, 2006 10:55 am
by espencer
oddly, it works now. I guess our problem was a misinstall of the Asterisk Perl module. Victor Jolin from the Philippines is quite skilled at setting these up and was able to help us get running. here are all the relevant configs from the working box:

sip.conf:

[cheaptermination]
type=peer
host=host.name.here
qualify=yes
dtmfmode=rfc2833
disallow=all
allow=g729


extensions.conf:

[globals]
TRUNKSIP=SIP/atg

[default]

exten => _91NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
exten => _91NXXNXXXXXX,2,Dial(${TRUNKSIP}/9997{EXTEN:1},30,Ttor)
exten => _91NXXNXXXXXX,3,congestion()
exten => _91NXXNXXXXXX,102,busy()

exten => _1NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
exten => _1NXXNXXXXXX,2,Dial(${TRUNKSIP}/9997${EXTEN:1},30,Ttor)
exten => _1NXXNXXXXXX,3,congestion()
exten => _1NXXNXXXXXX,102,busy()

exten => _NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
exten => _NXXNXXXXXX,2,Dial(${TRUNKSIP}/9997${EXTEN},30,Ttor)
exten => _NXXNXXXXXX,3,congestion()
exten => _NXXNXXXXXX,102,busy()

PostPosted: Sun Sep 17, 2006 11:01 pm
by gardo
espencer, you were able to dial-out without using any registration string to your provider? In your extensions. conf (shown below), you called TRUNKSIP but it doesn't have any values (TRUNKSIP=SIP/atg). What does atg means?

[globals]
TRUNKSIP=SIP/atg

[default]

exten => _91NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
exten => _91NXXNXXXXXX,2,Dial(${TRUNKSIP}/9997{EXTEN:1},30,Ttor)
exten => _91NXXNXXXXXX,3,congestion()
exten => _91NXXNXXXXXX,102,busy()

PostPosted: Sun Sep 17, 2006 11:51 pm
by Op3r
Gardo because his context [cheaptermination] is actually [atg]

Here is an example

Sip.conf

[atg]
type=peer
host=ww.sweetpotatovoip.com
qualify=yes
dtmfmode=rfc2833
disallow=all
allow=g729

now on your extensions.conf you declare it as a variable

SIPACCOUNT=SIP/atg

now when you want to use it you will do

[default]

exten => _91NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
exten => _91NXXNXXXXXX,2,Dial(${SIPACCOUNT}/9997{EXTEN:1},30,Ttor)
exten => _91NXXNXXXXXX,3,congestion()
exten => _91NXXNXXXXXX,102,busy()

Hope this helps.

and this is what you need to resolve your issue

PostPosted: Mon Sep 18, 2006 12:29 am
by gardo
mflorell wrote:You should define something like a "SIPdialout" global var at the top of the extensions.conf and use that instead of the sip.conf account name as you are now. For example, here is one of our examples from one of our systems:

extensions.conf:
[globals]
TRUNKSIPtest=VICItest:1234@10.10.10.16:5060

[default]
exten => _91NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
exten => _91NXXNXXXXXX,2,Dial(SIP/${EXTEN}@${TRUNKSIPtest},55,o)
exten => _91NXXNXXXXXX,3,Hangup


sip.conf:
[general]
register => VICItest:1234@10.10.10.16:5060


I tried this settings, however, I still can't make any outgoing calls. This is what's showing on my asterisk cli:

ep 18 13:27:14 NOTICE[8353]: app_enumlookup.c:216 load_config:
asterisk200*CLI>
-- Executing AGI("SIP/3001-b7904120", "call_log.agi|13233601730") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
-- AGI Script call_log.agi completed, returning 0
-- Executing Dial("SIP/3001-b7904120", "SIP/13233601730@user:passwd@sip.voipcheap.com:5060|55|o") in new stack
Sep 18 13:27:39 WARNING[13468]: chan_sip.c:1989 create_addr: No such host: local777
Sep 18 13:27:39 NOTICE[13468]: app_dial.c:1056 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Hangup("SIP/3001-b7904120", "") in new stack
== Spawn extension (default, 13233601730, 3) exited non-zero on 'SIP/3001-b7904120'
-- Executing DeadAGI("SIP/3001-b7904120", "call_log.agi|h") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
-- AGI Script call_log.agi completed, returning 0
-- Executing DeadAGI("SIP/3001-b7904120", "VD_hangup.agi|h") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/VD_hangup.agi
-- AGI Script VD_hangup.agi completed, returning 0

PostPosted: Mon Sep 18, 2006 12:35 am
by Op3r
Try what I just posted.

PostPosted: Mon Sep 18, 2006 9:52 am
by gardo
I'm almost out of my wits here trying to make vicidial do predictive dialing (autodial >=1). In manual mode, everything works fine. Automatic dialing is giving me headaches. Already tried different configurations based on the suggestions above and it still doesn't work.

PostPosted: Mon Sep 18, 2006 11:02 am
by espencer
thanks, op3r, for pointing out the error in my suggestions.

gardo, which version of asterisk are you using? 1.2.11 will not work properly. upgrade to 1.2.12.1 if you have not already done so.

PostPosted: Mon Sep 18, 2006 3:19 pm
by gardo
I'm running versions 1.2.12.1 and 1.2.12 on 2 separate asterisk boxes. Both have the same problem. Vicidial and Astguiclient treat the numbers as local extensions.

PostPosted: Mon Sep 18, 2006 3:25 pm
by mflorell
You should upgrade the 1.2.12 to 1.2.12.1 for other bug reasons.

Have you tried creating a [local777] account entry in your sip.conf file and reloading?

PostPosted: Mon Sep 18, 2006 5:21 pm
by gardo
There's already a [local777] in my sip.conf. It's more of a dialplan problem if I'm not mistaken right?

PostPosted: Mon Sep 18, 2006 9:45 pm
by mflorell
Not sure what to tell you now, maybe someone else uses a SIP provider like yours and can offer another suggestion. The settings I posted work for me, but different providers can sometimes need different connection strings.