Unable to make calls

Hi,

Can you help me with this issue

I registered extension 200 and 201 using FreePBX which can make and receive call successfully with each other. I created extension 202 by inserting rows on the tables of freePBX outside its GUI. Extension 202 can make calls to extensions 200 and 201 but the caller id displayed to this softphone (I am using Xlite as softphones) is “device 202” and not the display name I inputted. Also i can not make calls from 200 and 201 to 202. I try to to correct the error using CLI but i can’t really understand it. Here is the CLI out put every time I tried to call extension 202…

CLI OUTPUT:

– Executing Macro(“SIP/201-09b07f60”, “exten-vm|novm|202”) in new stack
– Executing Macro(“SIP/201-09b07f60”, “user-callerid”) in new stack
– Executing NoOp(“SIP/201-09b07f60”, “user-callerid: device 201”) in new stack
– Executing Set(“SIP/201-09b07f60”, “AMPUSER=201”) in new stack
– Executing GotoIf(“SIP/201-09b07f60”, “0?report”) in new stack
– Executing GotoIf(“SIP/201-09b07f60”, “0?start”) in new stack
– Executing Set(“SIP/201-09b07f60”, “REALCALLERIDNUM=201”) in new stack
– Executing NoOp(“SIP/201-09b07f60”, “REALCALLERIDNUM is 201”) in new stack
– Executing Set(“SIP/201-09b07f60”, “AMPUSER=201”) in new stack
– Executing Set(“SIP/201-09b07f60”, “AMPUSERCIDNAME=Mon Laptop”) in new stack
– Executing GotoIf(“SIP/201-09b07f60”, “0?report”) in new stack
– Executing Set(“SIP/201-09b07f60”, “AMPUSERCID=201”) in new stack
– Executing Set(“SIP/201-09b07f60”, “CALLERID(all)=“Mon Laptop” <201>”) in new stack
– Executing Set(“SIP/201-09b07f60”, “REALCALLERIDNUM=201”) in new stack
– Executing NoOp(“SIP/201-09b07f60”, “TTL: ARG1: novm”) in new stack
– Executing GotoIf(“SIP/201-09b07f60”, “0?continue”) in new stack
– Executing Set(“SIP/201-09b07f60”, “__TTL=64”) in new stack
– Executing GotoIf(“SIP/201-09b07f60”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing NoOp(“SIP/201-09b07f60”, “Using CallerID “Mon Laptop” <201>”) in new stack
– Executing Set(“SIP/201-09b07f60”, “FROMCONTEXT=exten-vm”) in new stack
– Executing Set(“SIP/201-09b07f60”, “VMBOX=novm”) in new stack
– Executing Set(“SIP/201-09b07f60”, “EXTTOCALL=202”) in new stack
– Executing Set(“SIP/201-09b07f60”, “CFUEXT=”) in new stack
– Executing Set(“SIP/201-09b07f60”, “CFBEXT=”) in new stack
– Executing Set(“SIP/201-09b07f60”, “RT=”) in new stack
– Executing Macro(“SIP/201-09b07f60”, “record-enable|202|IN”) in new stack
– Executing GotoIf(“SIP/201-09b07f60”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing AGI(“SIP/201-09b07f60”, “recordingcheck|20070913-150415|1189667055.2”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20070913-150415|1189667055.2: No AMPUSER db entry for 202. Not recording
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/201-09b07f60”, “No recording needed”) in new stack
– Executing Macro(“SIP/201-09b07f60”, “dial||tr|202”) in new stack
– Executing GotoIf(“SIP/201-09b07f60”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing AGI(“SIP/201-09b07f60”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
dialparties.agi: Caller ID name is ‘Mon Laptop’ number is '201’
dialparties.agi: Methodology of ring is ‘none’
– dialparties.agi: Added extension 202 to extension map
– dialparties.agi: Extension 202 cf is disabled
– dialparties.agi: Extension 202 do not disturb is disabled
dialparties.agi: Extension 202 has ExtensionState: 0
– dialparties.agi: Checking CW and CFB status for extension 202
– dialparties.agi: dbset CALLTRACE/202 to 201
dialparties.agi: Setting default NOANSWER DIALSTATUS since no extensions available
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing NoOp(“SIP/201-09b07f60”, “Returned from dialparties with no extensions to call and DIALSTATUS: NOANSWER”) in new stack
– Executing Set(“SIP/201-09b07f60”, “SV_DIALSTATUS=NOANSWER”) in new stack
– Executing GosubIf(“SIP/201-09b07f60”, “0?docfu|1”) in new stack
– Executing GosubIf(“SIP/201-09b07f60”, “0?docfb|1”) in new stack
– Executing Set(“SIP/201-09b07f60”, “DIALSTATUS=NOANSWER”) in new stack
– Executing NoOp(“SIP/201-09b07f60”, “Voicemail is novm”) in new stack
– Executing GotoIf(“SIP/201-09b07f60”, “1?s-NOANSWER|1”) in new stack
– Goto (macro-exten-vm,s-NOANSWER,1)
– Executing PlayTones(“SIP/201-09b07f60”, “congestion”) in new stack
– Executing Congestion(“SIP/201-09b07f60”, “10”) in new stack
== Spawn extension (macro-exten-vm, s-NOANSWER, 2) exited non-zero on ‘SIP/201-09b07f60’ in macro ‘exten-vm’
== Spawn extension (macro-exten-vm, s-NOANSWER, 2) exited non-zero on ‘SIP/201-09b07f60’


Here is my extensions_additional.conf (i just include this to my extensions.conf just what FreePBX is doing)

[globals]
#include globals_custom.conf
CALLFILENAME = ""
DIAL_OPTIONS = tr
TRUNK_OPTIONS =
DIAL_OUT = 9
FAX =
FAX_RX = system
FAX_RX_EMAIL = [email protected]
FAX_RX_FROM = [email protected]
INCOMING = group-all
NULL = ""
OPERATOR =
OPERATOR_XTN =
PARKNOTIFY = SIP/200
RECORDEXTEN = ""
RINGTIMER = 15
DIRECTORY = last
AFTER_INCOMING =
IN_OVERRIDE = forcereghours
REGTIME = 7:55-17:05
REGDAYS = mon-fri
DIRECTORY_OPTS =
DIALOUTIDS = 1/
OUTKEEPCID_1 = off
VM_PREFIX = *
VM_OPTS =
VM_GAIN =
VM_DDTYPE = u
TIMEFORMAT = kM
TONEZONE = us
ALLOW_SIP_ANON = no
OUTCID_1 = 4910302
OUTMAXCHANS_1 =
OUTPREFIX_1 =
OUT_1 = ZAP/g0
VMX_CONTEXT = from-internal
VMX_PRI = 1
VMX_TIMEDEST_CONTEXT =
VMX_TIMEDEST_EXT = dovm
VMX_TIMEDEST_PRI = 1
VMX_LOOPDEST_CONTEXT =
VMX_LOOPDEST_EXT = dovm
VMX_LOOPDEST_PRI = 1
VMX_OPTS_TIMEOUT =
VMX_OPTS_LOOP =
VMX_OPTS_DOVM =
VMX_TIMEOUT = 2
VMX_REPEAT = 1
VMX_LOOPS = 1
TRANSFER_CONTEXT = from-internal-xfer
ZAPTEL_DELAY = 0
ASTETCDIR = /etc/asterisk
ASTMODDIR = /usr/lib/asterisk/modules
ASTVARLIBDIR = /var/lib/asterisk
ASTAGIDIR = /var/lib/asterisk/agi-bin
ASTSPOOLDIR = /var/spool/asterisk
ASTRUNDIR = /var/run/asterisk
ASTLOGDIR = /var/log/asterisk
CWINUSEBUSY = true
AMPMGRUSER = admin
AMPMGRPASS = amp111

;end of [globals]

[app-dnd-off]
include => app-dnd-off-custom
exten => *79,1,Answer
exten => *79,n,Wait(1)
exten => *79,n,Macro(user-callerid,)
exten => *79,n,dbDel(DND/${AMPUSER})
exten => *79,n,Playback(do-not-disturb&de-activated)
exten => *79,n,Macro(hangupcall,)

; end of [app-dnd-off]

[app-dnd-on]
include => app-dnd-on-custom
exten => *78,1,Answer
exten => *78,n,Wait(1)
exten => *78,n,Macro(user-callerid,)
exten => *78,n,Set(DB(DND/${AMPUSER})=YES)
exten => *78,n,Playback(do-not-disturb&activated)
exten => *78,n,Macro(hangupcall,)

; end of [app-dnd-on]

[app-callwaiting-cwoff]
include => app-callwaiting-cwoff-custom
exten => *71,1,Answer
exten => *71,n,Wait(1)
exten => *71,n,Macro(user-callerid,)
exten => *71,n,dbDel(CW/${AMPUSER})
exten => *71,n,Playback(call-waiting&de-activated)
exten => *71,n,Macro(hangupcall,)

; end of [app-callwaiting-cwoff]

[app-callwaiting-cwon]
include => app-callwaiting-cwon-custom
exten => *70,1,Answer
exten => *70,n,Wait(1)
exten => *70,n,Macro(user-callerid,)
exten => *70,n,Set(DB(CW/${AMPUSER})=ENABLED)
exten => *70,n,Playback(call-waiting&activated)
exten => *70,n,Macro(hangupcall,)

; end of [app-callwaiting-cwon]

[app-dialvm]
include => app-dialvm-custom
exten => *98,1,Answer
exten => *98,n,Wait(1)
exten => *98,n,VoiceMailMain()
exten => *98,n,Macro(hangupcall,)
exten => _*98.,1,Answer
exten => _*98.,n,Wait(1)
exten => _*98.,n,Macro(get-vmcontext,${EXTEN:3})
exten => _*98.,n,VoiceMailMain(${EXTEN:3}@${VMCONTEXT})
exten => _*98.,n,Macro(hangupcall,)

; end of [app-dialvm]

[app-vmmain]
include => app-vmmain-custom
exten => *97,1,Answer
exten => *97,n,Wait(1)
exten => *97,n,Macro(user-callerid,)
exten => *97,n,Macro(get-vmcontext,${AMPUSER})
exten => *97,n(check),MailBoxExists(${AMPUSER}@${VMCONTEXT})
exten => *97,n,GotoIf($["${VMBOXEXISTSSTATUS}" = “SUCCESS”]?mbexist)
exten => *97,n,VoiceMailMain()
exten => *97,n,Macro(hangupcall,)
exten => *97,check+101(mbexist),VoiceMailMain(${AMPUSER}@${VMCONTEXT})
exten => *97,n,Macro(hangupcall,)

; end of [app-vmmain]

[cidlookup]
include => cidlookup-custom
exten => cidlookup_return,1,LookupCIDName
exten => cidlookup_return,n,Return()

; end of [cidlookup]

[app-calltrace]
include => app-calltrace-custom
exten => *69,1,Goto(app-calltrace-perform,s,1)

; end of [app-calltrace]

[app-calltrace-perform]
include => app-calltrace-perform-custom
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Macro(user-callerid,)
exten => s,n,Playback(info-about-last-call&telephone-number)
exten => s,n,Set(lastcaller=${DB(CALLTRACE/${AMPUSER})})
exten => s,n,GotoIf($[ $[ “${lastcaller}” = “” ] | $[ “${lastcaller}” = “unknown” ] ]?noinfo)
exten => s,n,SayDigits(${lastcaller})
exten => s,n,Set(TIMEOUT(digit)=3)
exten => s,n,Set(TIMEOUT(response)=7)
exten => s,n,Background(to-call-this-number&press-1)
exten => s,n,Goto(fin)
exten => s,n(noinfo),Playback(from-unknown-caller)
exten => s,n,Macro(hangupcall,)
exten => s,n(fin),Noop(Waiting for input)
exten => s,n,WaitExten(60,)
exten => s,n,Playback(sorry-youre-having-problems&goodbye)
exten => 1,1,Goto(from-internal,${lastcaller},1)
exten => i,1,Playback(vm-goodbye)
exten => i,n,Macro(hangupcall,)
exten => t,1,Playback(vm-goodbye)
exten => t,n,Macro(hangupcall,)

; end of [app-calltrace-perform]

[app-directory]
include => app-directory-custom
exten => #,1,Answer
exten => #,n,Wait(1)
exten => #,n,AGI(directory,${DIR-CONTEXT},from-did-direct,${DIRECTORY:0:1}${DIRECTORY_OPTS})
exten => #,n,Playback(vm-goodbye)
exten => #,n,Hangup
exten => i,1,Playback(privacy-incorrect)

; end of [app-directory]

[app-echo-test]
include => app-echo-test-custom
exten => *43,1,Answer
exten => *43,n,Wait(1)
exten => *43,n,Playback(demo-echotest)
exten => *43,n,Echo()
exten => *43,n,Playback(demo-echodone)
exten => *43,n,Hangup

; end of [app-echo-test]

[app-speakextennum]
include => app-speakextennum-custom
exten => *65,1,Answer
exten => *65,n,Wait(1)
exten => *65,n,Macro(user-callerid,)
exten => *65,n,Playback(your)
exten => *65,n,Playback(extension)
exten => *65,n,Playback(number)
exten => *65,n,Playback(is)
exten => *65,n,SayDigits(${AMPUSER})
exten => *65,n,Wait(2)
exten => *65,n,Hangup

; end of [app-speakextennum]

[app-speakingclock]
include => app-speakingclock-custom
exten => *60,1,Answer
exten => *60,n,Wait(1)
exten => *60,n,Set(NumLoops=0)
exten => *60,n(start),Set(FutureTime=$[${EPOCH} + 11])
exten => *60,n,Playback(at-tone-time-exactly)
exten => *60,n,GotoIf($["${TIMEFORMAT}" = “kM”]?hr24format)
exten => *60,n,SayUnixTime(${FutureTime},IM ‘and’ S ‘seconds’ p)
exten => *60,n,Goto(waitloop)
exten => *60,n(hr24format),SayUnixTime(${FutureTime},kM ‘and’ S ‘seconds’)
exten => *60,n(waitloop),Set(TimeLeft=$[${FutureTime} - ${EPOCH}])
exten => *60,n,GotoIf($[${TimeLeft} < 1]?playbeep)
exten => *60,n,Wait(1)
exten => *60,n,Goto(waitloop)
exten => *60,n(playbeep),Playback(beep)
exten => *60,n,Wait(5)
exten => *60,n,Set(NumLoops=$[${NumLoops} + 1])
exten => *60,n,GotoIf($[${NumLoops} < 5]?start)
exten => *60,n,Playback(goodbye)
exten => *60,n,Hangup

; end of [app-speakingclock]

[app-daynight-toggle]
include => app-daynight-toggle-custom
exten => s,1,Set(DAYNIGHTMODE=${DB(DAYNIGHT/C${INDEX}})
exten => s,n,GotoIf($["${DAYNIGHTMODE}" = “NIGHT”]?day:night)
exten => s,n(day),Set(DB(DAYNIGHT/C${INDEX})=DAY)
exten => s,n,Playback(beep&silence/1&day&reception&digits/${INDEX}&enabled)
exten => s,n,Hangup
exten => s,n(night),Set(DB(DAYNIGHT/C${INDEX})=NIGHT)
exten => s,n,Playback(beep&silence/1&beep&silence/1&day&reception&digits/${INDEX}&disabled)
exten => s,n,Hangup

; end of [app-daynight-toggle]

[app-cf-busy-off]
include => app-cf-busy-off-custom
exten => *91,1,Answer
exten => *91,n,Wait(1)
exten => *91,n,Macro(user-callerid,)
exten => *91,n,dbDel(CFB/${AMPUSER})
exten => *91,n,Playback(call-fwd-on-busy&de-activated)
exten => *91,n,Macro(hangupcall,)
exten => _*91.,1,Answer
exten => _*91.,n,Wait(1)
exten => _*91.,n,Set(fromext=${EXTEN:3})
exten => _*91.,n,dbDel(CFB/${fromext})
exten => _*91.,n,Playback(call-fwd-on-busy&for&extension)
exten => _*91.,n,SayDigits(${fromext})
exten => _*91.,n,Playback(cancelled)
exten => _*91.,n,Macro(hangupcall,)

; end of [app-cf-busy-off]

[app-cf-busy-off-any]
include => app-cf-busy-off-any-custom
exten => *92,1,Answer
exten => *92,n,Wait(1)
exten => *92,n,Playback(please-enter-your&extension)
exten => *92,n,Read(fromext,then-press-pound,)
exten => *92,n,Wait(1)
exten => *92,n,dbDel(CFB/${fromext})
exten => *92,n,Playback(call-fwd-on-busy&for&extension)
exten => *92,n,SayDigits(${fromext})
exten => *92,n,Playback(cancelled)
exten => *92,n,Macro(hangupcall,)

; end of [app-cf-busy-off-any]

[app-cf-busy-on]
include => app-cf-busy-on-custom
exten => *90,1,Answer
exten => *90,n,Wait(1)
exten => *90,n,Macro(user-callerid,)
exten => *90,n,Playback(call-fwd-on-busy)
exten => *90,n,Playback(please-enter-your&extension)
exten => *90,n,Read(fromext,then-press-pound,)
exten => *90,n,Set(fromext=${IF($[“foo${fromext}”=“foo”]?${AMPUSER}:${fromext})})
exten => *90,n,Wait(1)
exten => *90,n(startread),Playback(ent-target-attendant)
exten => *90,n,Read(toext,then-press-pound,)
exten => *90,n,GotoIf($[“foo${toext}”=“foo”]?startread)
exten => *90,n,Wait(1)
exten => *90,n,Set(DB(CFB/${fromext})=${toext})
exten => *90,n,Playback(call-fwd-on-busy&for&extension)
exten => *90,n,SayDigits(${fromext})
exten => *90,n,Playback(is-set-to)
exten => *90,n,SayDigits(${toext})
exten => *90,n,Macro(hangupcall,)
exten => _*90.,1,Answer
exten => _*90.,n,Wait(1)
exten => _*90.,n,Macro(user-callerid,)
exten => _*90.,n,Set(DB(CFB/${AMPUSER})=${EXTEN:3})
exten => _*90.,n,Playback(call-fwd-on-busy&for&extension)
exten => _*90.,n,SayDigits(${AMPUSER})
exten => _*90.,n,Playback(is-set-to)
exten => _*90.,n,SayDigits(${EXTEN:3})
exten => _*90.,n,Macro(hangupcall,)

; end of [app-cf-busy-on]

[app-cf-off]
include => app-cf-off-custom
exten => *73,1,Answer
exten => *73,n,Wait(1)
exten => *73,n,Macro(user-callerid,)
exten => *73,n,dbDel(CF/${AMPUSER})
exten => *73,n,Playback(call-fwd-unconditional&de-activated)
exten => *73,n,Macro(hangupcall,)
exten => _*73.,1,Answer
exten => _*73.,n,Wait(1)
exten => _*73.,n,Set(fromext=${EXTEN:3})
exten => _*73.,n,dbDel(CF/${fromext})
exten => _*73.,n,Playback(call-fwd-unconditional&for&extension)
exten => _*73.,n,SayDigits(${fromext})
exten => _*73.,n,Playback(cancelled)
exten => _*73.,n,Macro(hangupcall,)

; end of [app-cf-off]

[app-cf-off-any]
include => app-cf-off-any-custom
exten => *74,1,Answer
exten => *74,n,Wait(1)
exten => *74,n,Playback(please-enter-your&extension)
exten => *74,n,Read(fromext,then-press-pound,)
exten => *74,n,Wait(1)
exten => *74,n,dbDel(CF/${fromext})
exten => *74,n,Playback(call-fwd-unconditional&for&extension)
exten => *74,n,SayDigits(${fromext})
exten => *74,n,Playback(cancelled)
exten => *74,n,Macro(hangupcall,)

; end of [app-cf-off-any]

[app-cf-on]
include => app-cf-on-custom
exten => *72,1,Answer
exten => *72,n,Wait(1)
exten => *72,n,Macro(user-callerid,)
exten => *72,n,Playback(call-fwd-unconditional)
exten => *72,n,Playback(please-enter-your&extension)
exten => *72,n,Read(fromext,then-press-pound,)
exten => *72,n,Set(fromext=${IF($[“foo${fromext}”=“foo”]?${AMPUSER}:${fromext})})
exten => *72,n,Wait(1)
exten => *72,n(startread),Playback(ent-target-attendant)
exten => *72,n,Read(toext,then-press-pound,)
exten => *72,n,GotoIf($[“foo${toext}”=“foo”]?startread)
exten => *72,n,Wait(1)
exten => *72,n,Set(DB(CF/${fromext})=${toext})
exten => *72,n,Playback(call-fwd-unconditional&for&extension)
exten => *72,n,SayDigits(${fromext})
exten => *72,n,Playback(is-set-to)
exten => *72,n,SayDigits(${toext})
exten => *72,n,Macro(hangupcall,)
exten => _*72.,1,Answer
exten => _*72.,n,Wait(1)
exten => _*72.,n,Macro(user-callerid,)
exten => _*72.,n,Set(DB(CF/${AMPUSER})=${EXTEN:3})
exten => _*72.,n,Playback(call-fwd-unconditional&for&extension)
exten => _*72.,n,SayDigits(${AMPUSER})
exten => _*72.,n,Playback(is-set-to)
exten => _*72.,n,SayDigits(${EXTEN:3})
exten => _*72.,n,Macro(hangupcall,)

; end of [app-cf-on]

[app-cf-unavailable-off]
include => app-cf-unavailable-off-custom
exten => *53,1,Answer
exten => *53,n,Wait(1)
exten => *53,n,Macro(user-callerid,)
exten => *53,n,dbDel(CFU/${AMPUSER})
exten => *53,n,Playback(call-fwd-no-ans&de-activated)
exten => *53,n,Macro(hangupcall,)
exten => _*53.,1,Answer
exten => _*53.,n,Wait(1)
exten => _*53.,n,Set(fromext=${EXTEN:3})
exten => _*53.,n,dbDel(CFU/${fromext})
exten => _*53.,n,Playback(call-fwd-no-ans&for&extension)
exten => _*53.,n,SayDigits(${fromext})
exten => _*53.,n,Playback(cancelled)
exten => _*53.,n,Macro(hangupcall,)

; end of [app-cf-unavailable-off]

[app-cf-unavailable-on]
include => app-cf-unavailable-on-custom
exten => *52,1,Answer
exten => *52,n,Wait(1)
exten => *52,n,Macro(user-callerid,)
exten => *52,n,Playback(call-fwd-no-ans)
exten => *52,n,Playback(please-enter-your&extension)
exten => *52,n,Read(fromext,then-press-pound,)
exten => *52,n,Set(fromext=${IF($[“foo${fromext}”=“foo”]?${AMPUSER}:${fromext})})
exten => *52,n,Wait(1)
exten => *52,n(startread),Playback(ent-target-attendant)
exten => *52,n,Read(toext,then-press-pound,)
exten => *52,n,GotoIf($[“foo${toext}”=“foo”]?startread)
exten => *52,n,Wait(1)
exten => *52,n,Set(DB(CFU/${fromext})=${toext})
exten => *52,n,Playback(call-fwd-no-ans&for&extension)
exten => *52,n,SayDigits(${fromext})
exten => *52,n,Playback(is-set-to)
exten => *52,n,SayDigits(${toext})
exten => *52,n,Macro(hangupcall,)
exten => _*52.,1,Answer
exten => _*52.,n,Wait(1)
exten => _*52.,n,Macro(user-callerid,)
exten => _*52.,n,Set(DB(CFU/${AMPUSER})=${EXTEN:3})
exten => _*52.,n,Playback(call-fwd-no-ans&for&extension)
exten => _*52.,n,SayDigits(${AMPUSER})
exten => _*52.,n,Playback(is-set-to)
exten => _*52.,n,SayDigits(${EXTEN:3})
exten => _*52.,n,Macro(hangupcall,)

; end of [app-cf-unavailable-on]

[app-gabcast]
include => app-gabcast-custom
exten => *422,1,Macro(user-callerid,)
exten => *422,n,Goto(gabcast,${AMPUSER},1)

; end of [app-gabcast]

[gabcast]
include => gabcast-custom
exten => _X.,1,Dial(IAX2/iax.gabcast.com/422,120,tr)
exten => s,1,Dial(IAX2/iax.gabcast.com/422,120,tr)

; end of [gabcast]

[app-dictate-record]
include => app-dictate-record-custom
exten => *34,1,Answer
exten => *34,n,Macro(user-callerid,)
exten => *34,n,Noop(CallerID is ${AMPUSER})
exten => *34,n,Set(DICTENABLED=${DB(AMPUSER/${AMPUSER}/dictate/enabled)})
exten => *34,n,GotoIf($[$[“x${DICTENABLED}”=“x”]|$[“x${DICTENABLED}”=“xdisabled”]]?nodict:dictok)
exten => *34,n(nodict),Playback(feature-not-avail-line)
exten => *34,n,Hangup
exten => *34,n(dictok),Dictate(/var/lib/asterisk/sounds/dictate/${AMPUSER})
exten => *34,n,Macro(hangupcall,)

; end of [app-dictate-record]

[app-dictate-send]
include => app-dictate-send-custom
exten => *35,1,Answer
exten => *35,n,Macro(user-callerid,)
exten => *35,n,Noop(CallerID is ${AMPUSER})
exten => *35,n,Set(DICTENABLED=${DB(AMPUSER/${AMPUSER}/dictate/enabled)})
exten => *35,n,GotoIf($[$[“x${DICTENABLED}”=“x”]|$[“x${DICTENABLED}”=“xdisabled”]]?nodict:dictok)
exten => *35,n(nodict),Playback(feature-not-avail-line)
exten => *35,n,Hangup
exten => *35,n(dictok),Read(DICTFILE,enter-filename-short,)
exten => *35,n,Set(DICTEMAIL=${DB(AMPUSER/${AMPUSER}/dictate/email)})
exten => *35,n,Set(DICTFMT=${DB(AMPUSER/${AMPUSER}/dictate/format)})
exten => *35,n,Set(NAME=${DB(AMPUSER/${AMPUSER}/cidname)})
exten => *35,n,Playback(dictation-being-processed)
exten => *35,n,System(/var/lib/asterisk/bin/audio-email.pl --file /var/lib/asterisk/sounds/dictate/${AMPUSER}/${DICTFILE}.raw --attachment dict-${DICTFILE} --format ${DICTFMT} --to ${DICTEMAIL} --subject “Dictation from ${NAME} Attached”)
exten => *35,n,Playback(dictation-sent)
exten => *35,n,Macro(hangupcall,)

; end of [app-dictate-send]

[app-recordings]
include => app-recordings-custom
exten => *77,1,Macro(user-callerid,)
exten => *77,n,Wait(2)
exten => *77,n,Macro(systemrecording,dorecord)
exten => *99,1,Macro(user-callerid,)
exten => *99,n,Wait(2)
exten => *99,n,Macro(systemrecording,docheck)

; end of [app-recordings]

[ext-recordings]
include => ext-recordings-custom
exten => recording-2,1,Answer
exten => recording-2,n,Playback(a-collect-charge-of)
exten => recording-2,n,Hangup
exten => recording-4,1,Answer
exten => recording-4,n,Playback(welcome&digits/2&maryland&cafeteria&if-u-know-ext-dial&or&press-1&for&administration&press-2&for&sales&press-3&for&technical-support&press-4&for&research-and-development)
exten => recording-4,n,Hangup
exten => recording-3,1,Answer
exten => recording-3,n,Playback(welcome&digits/2&california&silence/2&if-youd-like-to-make-a-call)
exten => recording-3,n,Hangup

; end of [ext-recordings]

[app-blacklist-check]
include => app-blacklist-check-custom
exten => s,1,LookupBlacklist()
exten => s,n,GotoIf($["${LOOKUPBLSTATUS}"=“FOUND”]?blacklisted)
exten => s,n,Return()
exten => s,n(blacklisted),Answer
exten => s,n,Wait(1)
exten => s,n,Zapateller()
exten => s,n,Playback(ss-noservice)
exten => s,n,Hangup

; end of [app-blacklist-check]

[app-blacklist]
include => app-blacklist-custom
exten => *30,1,Goto(app-blacklist-add,s,1)
exten => *32,1,Goto(app-blacklist-last,s,1)
exten => *31,1,Goto(app-blacklist-remove,s,1)

; end of [app-blacklist]

[app-blacklist-add]
include => app-blacklist-add-custom
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Playback(enter-num-blacklist)
exten => s,n,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response)=60)
exten => s,n,Read(blacknr,then-press-pound,)
exten => s,n,SayDigits(${blacknr})
exten => s,n,Playback(if-correct-press&digits/1)
exten => s,n,Noop(Waiting for input)
exten => s,n(end),WaitExten(60,)
exten => s,n,Playback(sorry-youre-having-problems&goodbye)
exten => 1,1,Set(DB(blacklist/${blacknr})=1)
exten => 1,n,Playback(num-was-successfully&added)
exten => 1,n,Wait(1)
exten => 1,n,Hangup

; end of [app-blacklist-add]

[app-blacklist-last]
include => app-blacklist-last-custom
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Set(lastcaller=${DB(CALLTRACE/${CALLERID(number)})})
exten => s,n,GotoIf($[ $[ “${lastcaller}” = “” ] | $[ “${lastcaller}” = “unknown” ] ]?noinfo)
exten => s,n,Playback(privacy-to-blacklist-last-caller&telephone-number)
exten => s,n,SayDigits(${lastcaller})
exten => s,n,Set(TIMEOUT(digit)=3)
exten => s,n,Set(TIMEOUT(response)=7)
exten => s,n,Playback(if-correct-press&digits/1)
exten => s,n,Goto(end)
exten => s,n(noinfo),Playback(unidentified-no-callback)
exten => s,n,Hangup
exten => s,n,Noop(Waiting for input)
exten => s,n(end),WaitExten(60,)
exten => s,n,Playback(sorry-youre-having-problems&goodbye)
exten => 1,1,Set(DB(blacklist/${lastcaller})=1)
exten => 1,n,Playback(num-was-successfully)
exten => 1,n,Playback(added)
exten => 1,n,Wait(1)
exten => 1,n,Hangup

; end of [app-blacklist-last]

[app-blacklist-remove]
include => app-blacklist-remove-custom
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Playback(entr-num-rmv-blklist)
exten => s,n,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response)=60)
exten => s,n,Read(blacknr,then-press-pound,)
exten => s,n,SayDigits(${blacknr})
exten => s,n,Playback(if-correct-press&digits/1)
exten => s,n,Noop(Waiting for input)
exten => s,n(end),WaitExten(60,)
exten => s,n,Playback(sorry-youre-having-problems&goodbye)
exten => 1,1,dbDel(blacklist/${blacknr})
exten => 1,n,Playback(num-was-successfully&removed)
exten => 1,n,Wait(1)
exten => 1,n,Hangup

; end of [app-blacklist-remove]

[app-pbdirectory]
include => app-pbdirectory-custom
exten => 411,1,Answer
exten => 411,n,Wait(1)
exten => 411,n,Goto(pbdirectory,1)
exten => pbdirectory,1,AGI(pbdirectory)
exten => pbdirectory,n,GotoIf($["${dialnumber}"=""]?hangup,1)
exten => pbdirectory,n,Noop(Got number to dial: ${dialnumber})
exten => pbdirectory,n,Dial(Local/${dialnumber}@from-internal/n,)
exten => hangup,1,Hangup

; end of [app-pbdirectory]

[macro-speeddial-lookup]
include => macro-speeddial-lookup-custom
exten => s,1,GotoIf($["${ARG2}"=""]]?lookupsys)
exten => s,n,Set(SPEEDDIALNUMBER=)
exten => s,n(lookupuser),Set(SPEEDDIALNUMBER=${DB(AMPUSER/${ARG2}/speeddials/${ARG1})})
exten => s,n,GotoIf($["${SPEEDDIALNUMBER}"=""]?lookupsys)
exten => s,n,Noop(Found speeddial ${ARG1} for user ${ARG2}: ${SPEEDDIALNUMBER})
exten => s,n,Goto(end)
exten => s,lookupuser+101(lookupsys),Set(SPEEDDIALNUMBER=${DB(sysspeeddials/${ARG1})})
exten => s,n,GotoIf($["${SPEEDDIALNUMBER}"=""]?failed)
exten => s,n,Noop(Found system speeddial ${ARG1}: ${SPEEDDIALNUMBER})
exten => s,n,Goto(end)
exten => s,lookupsys+101(failed),Noop(No system or user speeddial found)
exten => s,n(end),Noop(End of Speeddial-lookup)

; end of [macro-speeddial-lookup]

[app-speeddial]
include => app-speeddial-custom
exten => _*0.,1,Macro(user-callerid,)
exten => _*0.,n,Set(SPEEDDIALLOCATION=${EXTEN:2})
exten => _*0.,n(lookup),Macro(speeddial-lookup,${SPEEDDIALLOCATION},${AMPUSER})
exten => _*0.,n,GotoIf($["${SPEEDDIALNUMBER}"=""]?failed)
exten => _*0.,n,Dial(Local/${SPEEDDIALNUMBER}@from-internal/n,)
exten => _*0.,lookup+101(failed),Playback(speed-dial-empty)
exten => _*0.,n,Congestion(20)
exten => *75,1,Goto(app-speeddial-set,s,1)

; end of [app-speeddial]

[app-speeddial-set]
include => app-speeddial-set-custom
exten => s,1,Macro(user-callerid,)
exten => s,n(setloc),Read(newlocation,speed-enterlocation,)
exten => s,n(lookup),Macro(speeddial-lookup,${newlocation},${AMPUSER})
exten => s,n(lookup),GotoIf($["${SPEEDDIALNUMBER}"!=""]?conflicts)
exten => s,n(setnum),Read(newnum,speed-enternumber,)
exten => s,n(success),Set(DB(AMPUSER/${AMPUSER}/speeddials/${newlocation})=${newnum})
exten => s,n,Playback(speed-dial)
exten => s,n,SayDigits(${newlocation})
exten => s,n,Playback(is-set-to)
exten => s,n,SayDigits(${newnum})
exten => s,n,Hangup
exten => s,n(conflicts),Playback(speed-dial)
exten => s,n,SayDigits(${newlocation})
exten => s,n,Playback(is-in-use)
exten => s,n,Background(press-1&to-listen-to-it&press-2&to-enter-a-diff&location&press-3&to-change&telephone-number)
exten => s,n,WaitExten(60,)
exten => 1,1,Playback(speed-dial)
exten => 1,n,SayDigits(${newlocation})
exten => 1,n,Playback(is-set-to)
exten => 1,n,SayDigits(${SPEEDDIALNUMBER})
exten => 1,n,Goto(s,conflicts)
exten => 2,1,Goto(s,setloc)
exten => 3,1,Goto(s,setnum)
exten => t,1,Congestion(20)

; end of [app-speeddial-set]

[app-userlogonoff]
include => app-userlogonoff-custom
exten => *12,1,Macro(user-logoff,)
exten => *12,n,Hangup
exten => *11,1,Macro(user-logon,)
exten => *11,n,Hangup
exten => _*11.,1,Macro(user-logon,${EXTEN:3},)
exten => _*11.,n,Hangup

; end of [app-userlogonoff]

[app-pickup]
include => app-pickup-custom
exten => _.,1,Noop(Attempt to Pickup ${EXTEN:2} by ${CALLERID(num)})
exten => _
.,n,Pickup(${EXTEN:2})

; end of [app-pickup]

[app-zapbarge]
include => app-zapbarge-custom
exten => 888,1,Macro(user-callerid,)
exten => 888,n,Set(GROUP()=${CALLERID(number)})
exten => 888,n,Answer
exten => 888,n,Wait(1)
exten => 888,n,ZapBarge()
exten => 888,n,Hangup

; end of [app-zapbarge]

[app-chanspy]
include => app-chanspy-custom
exten => 555,1,Macro(user-callerid,)
exten => 555,n,Answer
exten => 555,n,Wait(1)
exten => 555,n,ChanSpy()
exten => 555,n,Hangup

; end of [app-chanspy]

[ext-test]
include => ext-test-custom
exten => 7777,1,Goto(from-pstn,s,1)
exten => 666,1,Goto(ext-fax,in_fax,1)
exten => h,1,Macro(hangupcall,)

; end of [ext-test]

[ext-did]
include => ext-did-custom
exten => fax,1,Goto(ext-fax,in_fax,1)

; end of [ext-did]

[ext-did-catchall]
include => ext-did-catchall-custom
exten => s,1,Noop(No DID or CID Match)
exten => s,n,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(ss-noservice)
exten => s,n,SayAlpha(${FROM_DID})
exten => _[#X].,1,Set(__FROM_DID=${EXTEN})
exten => _[
#X].,n,Noop(Received an unknown call with DID set to ${EXTEN})
exten => _[*#X].,n,Goto(ext-did,s,1)

; end of [ext-did-catchall]

[ext-local]
include => ext-local-custom
exten => 200,1,Macro(exten-vm,novm,200)
exten => 200,n,Hangup
exten => 200,hint,SIP/200
exten => 201,1,Macro(exten-vm,novm,201)
exten => 201,n,Hangup
exten => 201,hint,SIP/201
exten => 202,1,Macro(exten-vm,novm,202)
exten => 202,n,Hangup
exten => 202,hint,SIP/202

; end of [ext-local]

[outbound-allroutes]
include => outbound-allroutes-custom
exten => foo,1,Noop(bar)

; end of [outbound-allroutes]

[app-blackhole]
include => app-blackhole-custom
exten => hangup,1,Noop(Blackhole Dest: Hangup)
exten => hangup,n,Hangup
exten => zapateller,1,Noop(Blackhole Dest: Play SIT Tone)
exten => zapateller,n,Answer
exten => zapateller,n,Zapateller()
exten => musiconhold,1,Noop(Blackhole Dest: Put caller on hold forever)
exten => musiconhold,n,Answer
exten => musiconhold,n,MusicOnHold()
exten => congestion,1,Noop(Blackhole Dest: Congestion)
exten => congestion,n,Answer
exten => congestion,n,Playtones(congestion)
exten => congestion,n,Congestion(20)
exten => congestion,n,Hangup
exten => busy,1,Noop(Blackhole Dest: Busy)
exten => busy,n,Answer
exten => busy,n,Playtones(busy)
exten => busy,n,Busy(20)
exten => busy,n,Hangup

; end of [app-blackhole]

[bad-number]
include => bad-number-custom
exten => _X.,1,Wait(1)
exten => _X.,n,Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer)
exten => _X.,n,Wait(1)
exten => _X.,n,Congestion(20)
exten => _X.,n,Hangup
exten => _.,1,Wait(1)
exten => _
.,n,Playback(silence/1&feature-not-avail-line&silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer)
exten => _.,n,Wait(1)
exten => _
.,n,Congestion(20)
exten => _*.,n,Hangup

; end of [bad-number]

[from-internal-additional]
include => from-internal-additional-custom
include => app-dnd-off
include => app-dnd-on
include => app-callwaiting-cwoff
include => app-callwaiting-cwon
include => ext-findmefollow
include => fmgrps
include => app-dialvm
include => app-vmmain
include => ext-group
include => grps
include => app-calltrace
include => app-directory
include => app-echo-test
include => app-speakextennum
include => app-speakingclock
include => app-daynight
include => app-daynight-toggle
include => ext-queues
include => app-cf-busy-off
include => app-cf-busy-off-any
include => app-cf-busy-on
include => app-cf-off
include => app-cf-off-any
include => app-cf-on
include => app-cf-unavailable-off
include => app-cf-unavailable-on
include => app-gabcast
include => app-dictate-record
include => app-dictate-send
include => app-recordings
include => ext-meetme
include => app-blacklist
include => app-pbdirectory
include => app-speeddial
include => app-userlogonoff
include => app-pickup
include => app-zapbarge
include => app-chanspy
include => ext-test
include => ext-local
include => outbound-allroutes
exten => h,1,Hangup

; end of [from-internal-additional]


and this is my sip_additional.conf

[200]
type=friend
secret=200
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5060
pickupgroup=
nat=yes
mailbox=200@device
host=dynamic
dtmfmode=rfc2833
disallow=
dial=SIP/200
context=from-internal
canreinvite=no
callgroup=
callerid=device <200>
allow=
accountcode=

[201]
type=friend
secret=201
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5060
pickupgroup=
nat=yes
mailbox=201@device
host=dynamic
dtmfmode=rfc2833
disallow=
dial=SIP/201
context=from-internal
canreinvite=no
callgroup=
callerid=device <201>
allow=
accountcode=

[202]
type=friend
secret=202
record_out=Never
record_in=Never
qualify=yes
port=5060
pickupgroup=
nat=yes
mailbox=202@device
host=dynamic
dtmfmode=rfc2833
disallow=
dial=SIP/202
context=from-internal
canreinvite=no
callgroup=
callerid=device <202>
allow=
accountcode=

I hope you can help me…

Mon Magallanes

FreePBX does more than just insert a row when you create a new user. It inserts a number of entries to the ASTDB (internal asterisk database), which you can see if you type ‘database show’ at the asterisk CLI.

If you want to insert rows externally, you should include some of the freePBX environment and call core_users_add() which will do all this stuff for you.


Greg MacLellan - Core freePBX Developer
http//freepbx.org - irc.freenode.net #freepbx

Hi,

Thank You very much Greg. I saw the core_user_add() function inside the functions.inc.php of the core module. Actually your reply is really a great help. Just want to confim, or correct me if I’m wrong. The $var parameter in the core_user_add($var) is the array got by the php page when you add a extension. so i’ll just call this function and pass this array?

Regrads,

Mon Magallanes

there was a mass update module posted to the ticket system a few weeks back that we have not gotten to reviewing yet. (sigh - we are quite behind in a lot of stuff, too much to do). It can give you a pretty good idea of what is needed. There is more then adding the user, you will need a device associated with that user as well.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

Hi Philippe,

I really appreciate your help.

I just installed freePBX this week and somehow trying to understand its architecture for a week. I just want to edit extensions using my version of PHP pages. Can you help me? Can you check my understanding on how to add extensions using this external page?

  1. Get the necessary information from the PHP page.
  2. Connect to DB.
  3. Create a new $ast object using php_asmanager.php.
  4. Add extension using core_users_add() in the functions.inc.php in /modules/core/ folder by passing the information gathered in the form of array.
  5. Generate config file.
  6. Restart amportal.

Guys, please bear with me? I’m just beginner-to-intermediate level in this technology. Actually, the VoIP technology here in the Philippines is just starting ang I’m one of the few who is willing and trying to understand it especially Asterisk. Can you help me?

Thanks,

Mon Magallanes

Mon,
go grab the module I mentioned. It is a tarball in the tracking system probably labeled as a submitted module so should not be hard to find. Load it and take a look at that script. From that you will probably get the most accurate information of what you need to collect and where you need to put it. Then you can code away at your own version.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

Philippe,

Thank you for your support and I really appreciate your help. Sorry for my ignorance but i can’t really find the module you were mentioning at the system tickets. I found this module extcfg.tar.gz but it just edit the CF, CW and DND feature of the extension but not the actual adding, deleting and editing of the extension. I’m really sorry for the waste of time but I really need your help. Don’t worry, in my side, i’ll continue studying the VoIP technology to somehow help my country men as local support guy…

Anyway, I think I can get use of the function.inc.php file at the core module folder… I’ll contniue to make “trial and error” approach for making my own version of this module.

Again thank you very much.

Regards,

Mon Magallanes

Ticket: #2195

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

Hi Philippe,

Thank you very much!!!

I can understand this one… And can really help me with the development… Don’t worry, i’ll try to look for something in return… This forum is really a great help…

Again, thank you very much…

Regards,

Mon Magallanes

Philippe,

I believe you can help me with this. I’m now trying to integrate the module you gave to me but it shows this error on the httpd error log:

fwrite(): supplied argument is not a valid stream resource in /var/www/html/admin/common/php-asmanager.php on line 150[client 127.0.0.1]

which the code on that line is tis:

function send_request($action, $parameters=array())
{
	$req = "Action: $action\r\n";
	foreach($parameters as $var=>$val)
		$req .= "$var: $val\r\n";
	$req .= "\r\n";
	fwrite($this->socket, $req);  <--- line 150
	return $this->wait_response();
}

I’m sure that I installed PEAR and didn’t change any directory location or source during my FreePBX installation. Also, I set the permission of /etc/asterisk to 777 (chmod 777 -R /etc/asterisk).

Hope you can help me.

Mon Magallanes

Note:

This is my modified ticket 2195:

<?php function WriteToAstDB($vars, $act){ global $db; global $amp_conf; global $asterisk_conf; global $astman; $_SERVER['PHP_AUTH_PW'] = 'admin'; $_SERVER['PHP_AUTH_USER'] = 'admin'; require_once ("/var/www/html/admin/functions.inc.php"); require_once("/var/www/html/admin/common/php-asmanager.php"); $amp_conf = parse_amportal_conf("/etc/amportal.conf"); $asterisk_conf = parse_asterisk_conf("/etc/asterisk/asterisk.conf"); $astman = new AGI_AsteriskManager(); require_once("/var/www/html/admin/common/db_connect.php"); require_once("/var/www/html/admin/header_auth.php"); require_once("/var/www/html/admin/modules/core/functions.inc.php"); if($act=='add'){ $_REQUEST = $vars; voicemail_mailbox_add($mbox, $vars); core_devices_add($vars["extension"],$vars["tech"],$vars["devinfo_dial"],$vars["devicetype"],$vars["deviceuser"],$vars["description"],$vars["emergency_cid"]); #core_devices_addsip($vars["extension"]); core_users_add($vars); needreload(); #redirect_standard_continue(); } if($act=='delete'){ } if($act=='edit'){ } } ?>

mon,
I unfortunately don’t have the time to look carefully at your issue. However, from quick glance it may be header_auth.php to header.php. That used to have all sorts of things that it shouldn’t and I believe it now includes just what it needs. If you are writing a standalone script that needs access to the FreePBX environment, you would probably be best to look at something like retireve_conf as an example of setting up all the needed include files, although it does a lot more. Or maybe module_admin might be better to look at.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

Philippe,

Thank you for your guidance and I succesfully inserted the extensions in the asterisk internal database… but i still got problems… Like before I can make calls from extensions created by my php version to extensions created by freePBX but I can’t make call if vice versa. At this point I really don’t know where to start to debug the error. I hope you can help me again.

This is the result of the ASTERISK CLI when I call to the extensions created by my php version:

-- Registered SIP '227' at 121.97.154.205 port 5061 expires 3600
-- Registered SIP '201' at 121.97.154.206 port 20222 expires 3600
-- Executing Macro("SIP/201-088a9a78", "exten-vm|novm|227") in new stack
-- Executing Macro("SIP/201-088a9a78", "user-callerid") in new stack
-- Executing NoOp("SIP/201-088a9a78", "user-callerid: device 201") in new stack
-- Executing Set("SIP/201-088a9a78", "AMPUSER=201") in new stack
-- Executing GotoIf("SIP/201-088a9a78", "0?report") in new stack
-- Executing GotoIf("SIP/201-088a9a78", "0?start") in new stack
-- Executing Set("SIP/201-088a9a78", "REALCALLERIDNUM=201") in new stack
-- Executing NoOp("SIP/201-088a9a78", "REALCALLERIDNUM is 201") in new stack
-- Executing Set("SIP/201-088a9a78", "AMPUSER=201") in new stack
-- Executing Set("SIP/201-088a9a78", "AMPUSERCIDNAME=Mon Laptop") in new stack
-- Executing GotoIf("SIP/201-088a9a78", "0?report") in new stack
-- Executing Set("SIP/201-088a9a78", "AMPUSERCID=201") in new stack
-- Executing Set("SIP/201-088a9a78", "CALLERID(all)="Mon Laptop" <201>") in new stack
-- Executing Set("SIP/201-088a9a78", "REALCALLERIDNUM=201") in new stack
-- Executing NoOp("SIP/201-088a9a78", "TTL:  ARG1: novm") in new stack
-- Executing GotoIf("SIP/201-088a9a78", "0?continue") in new stack
-- Executing Set("SIP/201-088a9a78", "__TTL=64") in new stack
-- Executing GotoIf("SIP/201-088a9a78", "1?continue") in new stack
-- Goto (macro-user-callerid,s,23)
-- Executing NoOp("SIP/201-088a9a78", "Using CallerID "Mon Laptop" <201>") in new stack
-- Executing Set("SIP/201-088a9a78", "FROMCONTEXT=exten-vm") in new stack
-- Executing Set("SIP/201-088a9a78", "VMBOX=novm") in new stack
-- Executing Set("SIP/201-088a9a78", "EXTTOCALL=227") in new stack
-- Executing Set("SIP/201-088a9a78", "CFUEXT=") in new stack
-- Executing Set("SIP/201-088a9a78", "CFBEXT=") in new stack
-- Executing Set("SIP/201-088a9a78", "RT=") in new stack
-- Executing Macro("SIP/201-088a9a78", "record-enable|227|IN") in new stack
-- Executing GotoIf("SIP/201-088a9a78", "0?2:4") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing AGI("SIP/201-088a9a78", "recordingcheck|20070919-171436|1190193276.16") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

recordingcheck|20070919-171436|1190193276.16: Inbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/201-088a9a78”, “No recording needed”) in new stack
– Executing Macro(“SIP/201-088a9a78”, “dial||tr|227”) in new stack
– Executing GotoIf(“SIP/201-088a9a78”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing AGI(“SIP/201-088a9a78”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
dialparties.agi: Caller ID name is ‘Mon Laptop’ number is '201’
dialparties.agi: Methodology of ring is ‘none’
– dialparties.agi: Added extension 227 to extension map
– dialparties.agi: Extension 227 cf is disabled
– dialparties.agi: Extension 227 do not disturb is disabled
– dialparties.agi: dbset CALLTRACE/227 to 201
dialparties.agi: Setting default NOANSWER DIALSTATUS since no extensions available
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing NoOp(“SIP/201-088a9a78”, “Returned from dialparties with no extensions to call and DIALSTATUS: NOANSWER”) in new stack
– Executing Set(“SIP/201-088a9a78”, “SV_DIALSTATUS=NOANSWER”) in new stack
– Executing GosubIf(“SIP/201-088a9a78”, “0?docfu|1”) in new stack
– Executing GosubIf(“SIP/201-088a9a78”, “0?docfb|1”) in new stack
– Executing Set(“SIP/201-088a9a78”, “DIALSTATUS=NOANSWER”) in new stack
– Executing NoOp(“SIP/201-088a9a78”, “Voicemail is novm”) in new stack
– Executing GotoIf(“SIP/201-088a9a78”, “1?s-NOANSWER|1”) in new stack
– Goto (macro-exten-vm,s-NOANSWER,1)
– Executing PlayTones(“SIP/201-088a9a78”, “congestion”) in new stack
– Executing Congestion(“SIP/201-088a9a78”, “10”) in new stack
== Spawn extension (macro-exten-vm, s-NOANSWER, 2) exited non-zero on ‘SIP/201-088a9a78’ in macro ‘exten-vm’
== Spawn extension (macro-exten-vm, s-NOANSWER, 2) exited non-zero on ‘SIP/201-088a9a78’

And this is the result of ‘database show’ in Asterisk CLI (FreePBX extensions: 200, 201… My Extension: 226, 227 -> focus to 227, I did not clean 226 when I delete it )

AMPUSER/200/cidname : Mon Desktop
/AMPUSER/200/cidnum : 200
/AMPUSER/200/device : 200
/AMPUSER/200/noanswer :
/AMPUSER/200/outboundcid :
/AMPUSER/200/password :
/AMPUSER/200/recording : out=Adhoc|in=Adhoc
/AMPUSER/200/ringtimer : 0
/AMPUSER/200/voicemail : novm
/AMPUSER/201/cidname : Mon Laptop
/AMPUSER/201/cidnum : 201
/AMPUSER/201/device : 201
/AMPUSER/201/noanswer :
/AMPUSER/201/outboundcid :
/AMPUSER/201/password :
/AMPUSER/201/recording : out=Adhoc|in=Adhoc
/AMPUSER/201/ringtimer : 0
/AMPUSER/201/voicemail : novm
/AMPUSER/226/cidname : Alex
/AMPUSER/226/cidnum : 226
/AMPUSER/226/device :
/AMPUSER/226/noanswer :
/AMPUSER/226/outboundcid :
/AMPUSER/226/password : 226
/AMPUSER/226/recording : out=Never|in=Never
/AMPUSER/226/ringtimer : 0
/AMPUSER/226/voicemail : novm
/AMPUSER/227/cidname : Alex
/AMPUSER/227/cidnum : 227
/AMPUSER/227/device :
/AMPUSER/227/noanswer :
/AMPUSER/227/outboundcid :
/AMPUSER/227/password : 227
/AMPUSER/227/recording : out=Never|in=Never
/AMPUSER/227/ringtimer : 0
/AMPUSER/227/voicemail : novm
/CALLTRACE/200 : 201
/CALLTRACE/201 : 225
/CALLTRACE/202 : 203
/CALLTRACE/203 : 202
/CALLTRACE/205 : 200
/CALLTRACE/222 : 201
/CALLTRACE/225 : 201
/CALLTRACE/227 : 201
/CW/200 : ENABLED
/CW/201 : ENABLED
/CW/226 : ENABLED
/CW/227 : ENABLED
/DEVICE/200/dial : SIP/200
/DEVICE/200/type : fixed
/DEVICE/200/user : 200
/DEVICE/201/dial : SIP/201
/DEVICE/201/type : fixed
/DEVICE/201/user : 201
/DEVICE/226/dial : SIP/226
/DEVICE/226/type : fixed
/DEVICE/226/user : 226
/DEVICE/227/dial : SIP/227
/DEVICE/227/type : fixed
/DEVICE/227/user : 227
/SIP/Registry/201 : 121.97.154.206:20222:3600:201:sip:[email protected]:20222;rinstance=bebe37582e971dd0
/SIP/Registry/205 : 121.97.155.242:13264:3600:205:sip:[email protected]:13264;rinstance=1c26435a5e0f7905
/SIP/Registry/222 : 121.97.154.205:5061:3600:222:sip:[email protected]:5061
/SIP/Registry/225 : 121.97.154.205:5061:3600:225:sip:[email protected]:5061
/SIP/Registry/227 : 121.97.154.205:5061:3600:227:sip:[email protected]:5061
/dundi/secret : Jo1FLE8sm2nk+m54fkRJbQ;B7pzM1irETzg814FTR3FMQ
/dundi/secretexpiry : 1190196803

I can see the difference on the SIP/Registry/‘extesion’ where 5061 is constant and there is no rinstance value… And at this point I really don’t know where to go… Please guide me again.

Hoping for your help,

Mon Magallanes

look at your astdb dump, almost all of your device details are missing. Without a device, a user can’t be called so that is not getting set somewhere.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

hi Philippe,

thank your for your guidance i can manage to make calls now using my php page… thank you for your support. I’m just cleaning my code and doing some javascript error handling.

Thanks a lot!

Regards,

Mon Magallanes