hi
i’m setting up asterisk with e billing system and i have a problem i coudn’t resolve ;any help would be appreciated .
so he is my extention.conf
[default]
exten => _.,1,Verbose(2,ALGERIA!!! ${EXTEN} ${ACCOUNTCODE} ${CDR(accountcode)})
exten => _.,n,Set(CDR(accountcode)=85)
exten => _.,n,Goto(termination,${EXTEN},1)
exten => _.,n,Answer()
exten => _.,n,Playback(hello-world)
exten => h,1,Hangup
[termination]
exten => _X.,1,Verbose(2,Inside termination ${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${EXTEN})
;exten => _X.,n,Congestion()
;exten => _X.,n,MixMonitor(${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${EXTEN}.wav|b)
exten => _X.,n,Verbose(2,Accountcode: ${CDR(accountcode)})
exten => _X.,n,Set(DESTINATION=${EXTEN})
exten => _X.,n,Verbose(2,Destination: ${DESTINATION})
exten => _X.,n,Set(QUERYSTRING=UPDATE\ sip_buddies\ SET\ last_used=NOW()\ WHERE\ accountcode=${CDR(accountcode)})
exten => _X.,n,Gosub(SUB_mysql_updatequery,${EXTEN},1)
…
and so on
and here is my log
– Accepting UNAUTHENTICATED call from 192.168.1.21:
> requested format = g729,
> requested prefs = (gsm),
> actual format = g729,
> host prefs = (g729),
> priority = mine
– Executing [00213778999999|60|HhL(72000000)M(stime^7974)@default :1] Verbose(“IAX2/192.168.1.21:12300-3102”, “2|ALGERIA!!! 00213778999999|60|HhL(72000000)M(stime^7974) 85”) in new stack
== ALGERIA!!! 00213778999999|60|HhL(72000000)M(stime^7974) 85
– Executing [00213778999999|60|HhL(72000000)M(stime^7974)@default :2] Set(“IAX2/192.168.1.21:12300-3102”, “CDR(accountcode)=85”) in new stack
– Executing [00213778999999|60|HhL(72000000)M(stime^7974)@default :3] Goto(“IAX2/192.168.1.21:12300-3102”, “termination|00213778999999|60|HhL(72000000)M(stime^7974)|1”) in new stack
– Goto (termination,00213778999999,60)
– Executing [00213778999999@termination:60] Set(“IAX2/192.168.1.21:12300-3102”, “QUERYSTRING=SELECT min_seconds,min_waiting,max_waiting,start_time1,end_time1,start_time2,end_time2,refill_threshold,prefix FROM trunk_groups
WHERE trunk_group_id= LIMIT 1”) in new stack
– Executing [00213778999999@termination:61] Set(“IAX2/192.168.1.21:12300-3102”, “RETURNVARS=MIN_SECONDS MIN_WAITING MAX_WAITING S_TIME1 E_TIME1 S_TIME2 E_TIME2 REFILL_THRESHOLD TG_PREFIX”) in new stack
– Executing [00213778999999@termination:62] Gosub(“IAX2/192.168.1.21:12300-3102”, “dialout||1”) in new stack
– Executing [00213778999999@dialout:1] Verbose(“IAX2/192.168.1.21:12300-3102”, “2|Dialout…”) in new stack
the problem is i downt know why the dial plan is not executed properly .in the dial plan i have
exten => _.,n,Goto(termination,${EXTEN},1)
but from the log
Goto (termination,00213778999999,60)
i realy dont know from where the 60 is comming and why the termination context is not executed from the begining but from the 60 line ?
thank’s a lot guys for giving it some time!!!
From the extension. | is an obsolete parameter separator.
thanks for the reply.but i dont have any errors in my debug .
my question why do i have Goto b [/b]
it should be Goto b [/b]
any suggestions ???
other thing , i’m still on the 1.4 version !!!
Your current extension is: 00213778999999|60|HhL(72000000)M(stime
This contains the Asterisk 1.4 argument separator, so when the variable is substituted, it parses as:
Dialstring: SIP/00213778999999
Timeout: 60
Options: HhL(72000000)M(stime
You appear to be getting this extension from the other end of the IAX link, possibly because it is not 1.4, but has been configured as though it was.