Apparently I spoke too soon. While I can make calls, my original problem has not changed. (Cannot hang up calls that are > 1 minute.)
Hoping someone can point me in the right direction here.
These are my carrier settings:
Carrier Name: BELLSIP
Registration String: None
Account entry:
[carrier]
host=192.168.10.119
fromuser=admin
secret=password
context=trunkinbound
type=friend
qualify=1000
dtmfmode=rfc2833
canreinvite=no
allow=ulaw
port=5060
insecure=invite
Globals String: BELLSIP=SIP/carrier
DialPlan entry:
exten => _9NXXNXXXXXX,1, AGI(
agi://127.0.0.1:4577/call_log)
exten => _9NXXNXXXXXX,n,Dial(${TRUNKloop}/888${EXTEN:2},55,o)
exten => _9NXXNXXXXXX,n,Hangup()
exten => _888NXXNXXXXXX,1,Goto(loopback-no-log,9${EXTEN:3},1)
exten => _888NXXNXXXXXX,n,Hangup()
----------------------------------------------
The uncommented portion of the loopback portion of extensions.conf is:
exten => _9NXXNXXXXXX,1,Set(CALLERID(all)="name" <number>)
exten => _9NXXNXXXXXX,n,AGI(agi-CANADA_PRI_CIDname.agi)
exten => _9NXXNXXXXXX,n,Dial(${BELLSIP}/${EXTEN:1},,To)
exten => _9NXXNXXXXXX,n,Hangup()
-----------------------------------------------
This works, in that I can dial out via 888(number) and proceed as normal. If the call is very short, I can also hang up.
If the call is > 1 minute the only way to terminate the call is to forcibly log the agent out.
However, I still get no errors when using the API. These are some inputs and outputs when trying to hangup:
Status Prior to hangup:INCALL,M9281321100000000275,275,186703,26,[Agent Name],AGENTS,1,LOGIN,DIAL,[PHONE NUMBER],,8600051
Sending the hangup request:http://192.168.10.121/agc/api.php?source=test&user=[admin user]&pass=[admin password]&agent_user=102&function=external_hangup&value=1
SUCCESS: external_hangup function set - 1|102
Status post hangup requestINCALL,M9281321100000000275,275,186703,26,[Agent Name],AGENTS,1,LOGIN,DIAL,[PHONE NUMBER],,8600051
No activity occurs on the asterisk-r console during any of this. I can use the api to log the agent out normally, but this still does not end the call.
Have I missed something in setting up the loopback?