Asterisk-A2billing : Making a call ( subscriber absent )

Hi ,
I tried to make a call using SIP accounts that i created with the “Add Customer” feature in a2billing. Although VOIP clients showed me that the 2 accounts are ready , i couldn’t do any call from a softphone. it tells me “the number you have dialled is currently unavaible”. Please find below all the details :

i’m using :

  • a2billing v 1.9.4
  • asterisk v 12.8.2
  • freepbx v 12.0.74

calling a softphone results ( asterisk log ) :

WARNING[2372]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead WARNING[2372]: chan_sip.c:30770 build_peer: no value given for outbound proxy on line 0 of sip.conf WARNING[3001][C-00000000]: res_agi.c:4237 deadagi_exec: DeadAGI has been deprecated, please use AGI in all cases! ERROR[3001][C-00000000]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("LOCAL", "(null)", ...): Temporary failure in name resolution chan_sip.c:6179 create_addr: No such host: LOCAL [b]app_dial.c:2421 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)[/b]

We don’t support a2billing or freepbx and you haven’t provided enough logging to work out what the dialplan is actually doing and how you have configured the sip peer.

Thanks for your reply ,sorry i posted the discussion here but i think it’s an Asterisk problem ( maybe the dialplan configuration). PS : I’m fairly new to asterisk and trying to learn.
Please find below all the informations concerning SIP peers and extensions :

i’m using Asterisk Realtime architecture :
Peer 1 :

Name : 0167192387 Description : Realtime peer: Yes, cached Secret : <Set> MD5Secret : <Not set> Remote Secret: <Not set> Context : a2billing Record On feature : automon Record Off feature : automon Subscr.Cont. : <Not set> Language : Tonezone : <Not set> Accountcode : 0167192387 AMA flags : BILLING Transfer mode: closed CallingPres : Presentation Allowed, Not Screened Callgroup : Pickupgroup : Named Callgr : Nam. Pickupgr: MOH Suggest : Mailbox : VM Extension : LastMsgsSent : 0/0 Call limit : 0 Max forwards : 0 Dynamic : Yes Callerid : "" <> MaxCallBR : 0 kbps Expire : 3109 Insecure : no Force rport : Yes Symmetric RTP: Yes ACL : No DirectMedACL : No T.38 support : No T.38 EC mode : Unknown T.38 MaxDtgrm: 4294967295 DirectMedia : Yes PromiscRedir : No User=Phone : No Video Support: No Text Support : No Ign SDP ver : No Trust RPID : No Send RPID : No Path support : No Path : N/A TrustIDOutbnd: Legacy Subscriptions: Yes Overlap dial : Yes DTMFmode : rfc2833 Timer T1 : 500 Timer B : 32000 ToHost : Addr->IP : 192.168.1.65:5060 Defaddr->IP : (null) Prim.Transp. : UDP Allowed.Trsp : UDP Def. Username: 0167192387 SIP Options : (none) Codecs : (gsm|ulaw|alaw|g729) Codec Order : (ulaw:20,alaw:20,gsm:20,g729:20) Auto-Framing : No Status : Unmonitored Useragent : Twinkle/1.4.2 Reg. Contact : sip:0167192387@192.168.1.65 Qualify Freq : 60000 ms Keepalive : 0 ms Sess-Timers : Accept Sess-Refresh : uas Sess-Expires : 1800 secs Min-Sess : 90 secs RTP Engine : asterisk Parkinglot : Use Reason : No Encryption : No

Peer 2 :

Name : 3440858128 Description : Realtime peer: Yes, cached Secret : <Set> MD5Secret : <Not set> Remote Secret: <Not set> Context : a2billing Record On feature : automon Record Off feature : automon Subscr.Cont. : <Not set> Language : Tonezone : <Not set> Accountcode : 3440858128 AMA flags : BILLING Transfer mode: closed CallingPres : Presentation Allowed, Not Screened Callgroup : Pickupgroup : Named Callgr : Nam. Pickupgr: MOH Suggest : Mailbox : VM Extension : LastMsgsSent : 0/0 Call limit : 0 Max forwards : 0 Dynamic : Yes Callerid : "" <> MaxCallBR : 0 kbps Expire : 2736 Insecure : no Force rport : Yes Symmetric RTP: Yes ACL : No DirectMedACL : No T.38 support : No T.38 EC mode : Unknown T.38 MaxDtgrm: 4294967295 DirectMedia : Yes PromiscRedir : No User=Phone : No Video Support: No Text Support : No Ign SDP ver : No Trust RPID : No Send RPID : No Path support : No Path : N/A TrustIDOutbnd: Legacy Subscriptions: Yes Overlap dial : Yes DTMFmode : rfc2833 Timer T1 : 500 Timer B : 32000 ToHost : Addr->IP : 192.168.1.122:32370 Defaddr->IP : (null) Prim.Transp. : UDP Allowed.Trsp : UDP Def. Username: 3440858128 SIP Options : (none) Codecs : (gsm|ulaw|alaw|g729) Codec Order : (ulaw:20,alaw:20,gsm:20,g729:20) Auto-Framing : No Status : Unmonitored Useragent : X-Lite release 1006e stamp 34025 Reg. Contact : sip:3440858128@192.168.1.122:32370;rinstance=92ad5562fc5b7550 Qualify Freq : 60000 ms Keepalive : 0 ms Sess-Timers : Accept Sess-Refresh : uas Sess-Expires : 1800 secs Min-Sess : 90 secs RTP Engine : asterisk Parkinglot : Use Reason : No Encryption : No

sip configuration

[general]
vmexten=*97
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
useragent=FPBX-12.0.74(12.8.2)
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g726
bindport=5061
nat=yes
g726nonstandard=no
videosupport=no
maxcallbitrate=384
canreinvite=no
rtptimeout=30
rtpholdtimeout=300
checkmwi=10
notifyringing=yes
notifyhold=yes
registertimeout=20
maxexpiry=3600
minexpiry=60
defaultexpiry=120
jbenable=no
ALLOW_SIP_ANON=no
allowguest=yes
srvlookup=no
callevents=no

dialplan :

[code][macro-dialout-trunk-predial-hook]
exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" = “A2B/”]?custom-freepbx-a2billing,${OUTNUM},1:2)
exten => s,2,MacroExit

[custom-freepbx-a2billing]
exten => X.,1,DeadAGI(a2billing.php,${OUT${DIAL_TRUNK}:8})
exten => _X.,n,Hangup()

[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,deadAGI(a2billing.php,1)
exten => _X.,n,Hangup

[a2billing-callback]
exten => _X.,1,deadAGI(a2billing.php,1,callback)
exten => _X.,n,Hangup

[a2billing-cid-callback]
exten => _X.,1,deadAGI(a2billing.php,1,cid-callback,34) ;last parameter is the callback area code
exten => _X.,n,Hangup

[a2billing-all-callback]
exten => _X.,1,deadAGI(a2billing.php,1,all-callback,34) ;last parameter is the callback area code
exten => _X.,n,Hangup

[a2billing-did]
exten => _X.,1,deadAGI(a2billing.php,1,did)
exten => _X.,2,Hangup

[a2billing-voucher]
exten => _X.,1,deadAGI(a2billing.php,1,voucher)
exten => _X.,n,Hangup

[custom-a2billing-did]
exten => _X.,1,deadAGI(a2billing.php,1,did)
exten => _X.,2,Hangup

[custom-a2billing]
exten => _X.,1,deadAGI(a2billing.php,1)
exten => _X.,n,Hangup

[did]
exten => _X.,1,AGI(a2billing.php|1|did)
[/code]
Asterisk full log during the call and the subscribtion :

[2015-08-18 01:06:07] WARNING[1680]: sip/config_parser.c:812 sip_parse_nat_optio n: nat=yes is deprecated, use nat=force_rport,comedia instead [2015-08-18 01:06:07] NOTICE[1680]: chan_sip.c:30842 build_peer: The 'username' field for sip peers has been deprecated in favor of the term 'defaultuser' [2015-08-18 01:06:07] WARNING[1680]: chan_sip.c:30770 build_peer: no value given for outbound proxy on line 0 of sip.conf -- Registered SIP '3440858128' at 192.168.1.122:32370 [2015-08-18 01:06:08] NOTICE[1680]: chan_sip.c:27813 handle_request_subscribe: R eceived SIP subscribe for peer without mailbox: 3440858128 [2015-08-18 01:07:08] NOTICE[1680]: chan_sip.c:27813 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 3440858128 [2015-08-18 01:09:08] NOTICE[1680]: chan_sip.c:27813 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 3440858128 [2015-08-18 01:10:12] WARNING[1680]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead [2015-08-18 01:10:12] WARNING[1680]: chan_sip.c:30770 build_peer: no value given for outbound proxy on line 0 of sip.conf -- Registered SIP '0167192387' at 192.168.1.65:5060 == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Executing [0167192387@a2billing:1] Answer("SIP/3440858128-00000000", "") in new stack > 0x7f4cd00266a0 -- Probation passed - setting RTP source address to 192.168.1.122:37094 -- Executing [0167192387@a2billing:2] Wait("SIP/3440858128-00000000", "1") in new stack -- Executing [0167192387@a2billing:3] DeadAGI("SIP/3440858128-00000000", "a2billing.php,1") in new stack [2015-08-18 01:10:42] WARNING[1998][C-00000000]: res_agi.c:4237 deadagi_exec: DeadAGI has been deprecated, please use AGI in all cases! -- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php -- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0) -- <SIP/3440858128-00000000> Playing 'digits/30.gsm' (language 'en') -- Playing 'dollars' (escape_digits=#) (sample_offset 0) -- <SIP/3440858128-00000000> Playing 'prepaid-enter-dest.gsm' (language 'en') -- <SIP/3440858128-00000000> Playing 'prepaid-enter-dest.gsm' (language 'en') -- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0) -- <SIP/3440858128-00000000> Playing 'digits/1.gsm' (language 'en') -- <SIP/3440858128-00000000> Playing 'digits/hundred.gsm' (language 'en') -- <SIP/3440858128-00000000> Playing 'digits/50.gsm' (language 'en') -- Playing 'prepaid-minutes' (escape_digits=#) (sample_offset 0) -- AGI Script Executing Application: (DIAL) Options: (SIP/LOCAL/0167192387|60|HRrL(9000000:61000:30000)) == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 [2015-08-18 01:11:14] ERROR[1998][C-00000000]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("LOCAL", "(null)", ...): Temporary failure in name resolution [2015-08-18 01:11:14] WARNING[1998][C-00000000]: chan_sip.c:6179 create_addr: No such host: LOCAL [2015-08-18 01:11:14] WARNING[1998][C-00000000]: app_dial.c:2421 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) == Everyone is busy/congested at this time (1:0/0/1) -- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0) -- <SIP/3440858128-00000000> Playing 'prepaid-enter-dest.gsm' (language 'en') -- <SIP/3440858128-00000000>AGI Script a2billing.php completed, returning 4 == Spawn extension (a2billing, 0167192387, 3) exited non-zero on 'SIP/3440858128-00000000'

There is no

[LOCAL]

section in your sip.conf and you have no DNS entry for LOCAL with the current domain search path.

Furthermore, I cannot see where the address part of the dialstring came from in your provided dialplan code, so I’m not sure if you were really trying to dial Local/99999 instead of a SIP peer with sip.conf section name or DNS name LOCAL.

Note generally though that the dialplan that needs to be analysed to find a general problem includes all the parts of the FreePBX, and a2billing dial plans and AGI scripts that are being executed, not just the customisations. In this case, the failing operation is being invoked from an a2billing AGI script, but, fortunately the fact that it was calling DIal and the parameters passed, where logged.

I’m also a bit worried about the presence of "|"s in the Dial options that it is using, as that is an obsolete dialplan syntax.

Actually all configurations are generated automatically by a2billing and freepbx ( dialPlan and SIP ) and local is a custom trunk created by freepbx.I will check the configurations manually. I’ll post the solution if i’ll find it. Thanks a lot for your reply david55 !

I found a solution, you just need to change the provider technology (the Trunk feature in a2billing ) to local. I was using SIP as a Provider Tech , that’s i was receiving “subscriber Absent” , the trunk could not be registered to Asterisk.
You must also customize manually your dialplan via a context called [ext-local]