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'