Dial() and Portech Gsm Gateway don't work

Hi to all, I am new in this forum. Anyone can help me?

Why my {dialstatus} don’t work for example if remote end is busy?

I have a portech mv 372, and if i call my mobile phone ( and i’m busy ) dial don’t goto to busy priority… this is my dialplan:

[uscita]
exten => _[03]X.,1,Answer()
exten => _[03]X.,2,Noop(Sto chiamando un cellulare: ${EXTEN})
exten => _[03]X.,3,ResetCDR()
exten => _[03]X.,4,Wait(0.5)
exten => _[03]X.,5,AGI(kkcc/app_callout.php)
exten => _[03]X.,6,AGI(kkcc/app_mux.php)
exten => _[03]X.,7,Set(CALLERID(name)=${TRUNKOUT})
exten => _[03]X.,8,Set(CALLERID(num)=${TRUNKOUT})
exten => _[03]X.,9,Noop(Passando per il trunk: ${TRUNKOUT})
exten => _[03]X.,10,Dial(SIP/${TRUNKOUT}/${EXTEN},300,tT)
exten => _[03]X.,11,Macro(autohangup,s-${DIALSTATUS})

exten => _[03]X.,n(chiama),Dial(${COMANDO})
exten => _[03]X.,n(chiama),Macro(autohangup,s-${DIALSTATUS})

exten => _[03]X.,n(coda),Queue(${COMANDO})
exten => _[03]X.,n(coda),Hangup

exten => h,1,Hangup()

e quindi la macro autohangup:

[macro-autohangup]
exten => s,1,goto(${ARG1},1)
exten => s-CHANUNAVAIL,1,Noop(${EXTEN} --> ESTENSIONE NON ESISTENTE OPPURE OCCUPATA)
exten => s-CHANUNAVAIL,2,ResetCDR(w)
exten => s-CHANUNAVAIL,3,NoCDR()
exten => s-CHANUNAVAIL,4,Congestion(20)

exten => s-ANSWER,1,Noop(${EXTEN} --> TUTTO OK)
exten => s-ANSWER,2,Hangup

exten => s-BUSY,1,Noop(${EXTEN} --> OCCUPATO)
exten => s-BUSY,2,ResetCDR(w)
exten => s-BUSY,3,NoCDR()
exten => s-BUSY,4,Busy(20)

exten => s-CONGESTION,1,Noop(${EXTEN} --> ERRORE GENERALE)
exten => s-CONGESTION,2,ResetCDR(w)
exten => s-CONGESTION,3,NoCDR()
exten => s-CONGESTION,4,Congestion(20)

exten => s-NOANSWER,1,Noop(${EXTEN} --> NON HA RISPOSTO)
exten => s-NOANSWER,2,Hangup

exten => s-CANCEL,1,Noop(${EXTEN} CHIAMATA ANNULLATA)
exten => s-CANCEL,2,Hangup
exten => s-.,1,Noop(${EXTEN} --> DS: ${DIALSTATUS} HU: ${HANGUPCAUSE})

Hello,

In order to help you out please post the Asterisk logs (console or full) because we could not guess what is happening there.

Thanks,
Ioan.

thank you for your reply, this is what i see in my full log:

[Mar 24 08:32:50] VERBOSE[8785] pbx.c: [Mar 24 08:32:50] – Executing [348323xxxx@gsm-in:1] ^[[1;36mAnswer^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35m^[[0m”) in new stack
[Mar 24 08:32:50] VERBOSE[8785] pbx.c: [Mar 24 08:32:50] – Executing [348323xxxx@gsm-in:2] ^[[1;36mResetCDR^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35m^[[0m”) in new stack
[Mar 24 08:32:50] VERBOSE[8785] pbx.c: [Mar 24 08:32:50] – Executing [348323xxxx@gsm-in:3] ^[[1;36mWait^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35m0.5^[[0m”) in new stack
[Mar 24 08:32:50] VERBOSE[8785] pbx.c: [Mar 24 08:32:50] – Executing [348323xxxx@gsm-in:4] ^[[1;36mAGI^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mkkcc/app_demux.php^[[0m”) in new stack
[Mar 24 08:32:50] VERBOSE[8785] res_agi.c: [Mar 24 08:32:50] – Launched AGI Script /var/lib/asterisk/agi-bin/kkcc/app_demux.php
[Mar 24 08:32:51] VERBOSE[8785] res_agi.c: [Mar 24 08:32:51] kkcc/app_demux.php: Sistemazione callerid…
[Mar 24 08:32:51] VERBOSE[8785] res_agi.c: [Mar 24 08:32:51] kkcc/app_demux.php: ---------------- INFO CHIAMATA ----------------
[Mar 24 08:32:51] VERBOSE[8785] res_agi.c: [Mar 24 08:32:51] kkcc/app_demux.php: CHIAMANTE: 345324xxxx
[Mar 24 08:32:51] VERBOSE[8785] res_agi.c: [Mar 24 08:32:51] kkcc/app_demux.php: TRUNK: 348323xxxx
[Mar 24 08:32:51] VERBOSE[8785] res_agi.c: [Mar 24 08:32:51] kkcc/app_demux.php: VERIFICA DISA…
[Mar 24 08:32:51] VERBOSE[8785] res_agi.c: [Mar 24 08:32:51] kkcc/app_demux.php: INDIVIDUATO DISA, SALTO AL CONTESTO GIUSTO… CONTEXT: disa-in PRIORITY: 1
[Mar 24 08:32:51] VERBOSE[8785] res_agi.c: [Mar 24 08:32:51] – <SIP/348323xxxx-00000000>AGI Script kkcc/app_demux.php completed, returning 0
[Mar 24 08:32:51] VERBOSE[8785] pbx.c: [Mar 24 08:32:51] – Executing [348323xxxx@disa-in:1] ^[[1;36mResetCDR^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35m^[[0m”) in new stack
[Mar 24 08:32:51] VERBOSE[8785] pbx.c: [Mar 24 08:32:51] – Executing [348323xxxx@disa-in:2] ^[[1;36mSet^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mTIMEOUT(digit)=10^[[0m”) in new stack
[Mar 24 08:32:51] VERBOSE[8785] func_timeout.c: [Mar 24 08:32:51] – Digit timeout set to 10.000
[Mar 24 08:32:51] VERBOSE[8785] pbx.c: [Mar 24 08:32:51] – Executing [348323xxxx@disa-in:3] ^[[1;36mSet^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mTIMEOUT(response)=10^[[0m”) in new stack
[Mar 24 08:32:51] VERBOSE[8785] func_timeout.c: [Mar 24 08:32:51] – Response timeout set to 10.000
[Mar 24 08:32:51] VERBOSE[8785] pbx.c: [Mar 24 08:32:51] – Executing [348323xxxx@disa-in:4] ^[[1;36mDISA^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mno-password,disa-call^[[0m”) in new stack
[Mar 24 08:32:59] VERBOSE[8785] pbx.c: [Mar 24 08:32:59] – Executing [329234xxxx@disa-call:1] ^[[1;36mNoOp^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mChiamata 329234xxxx tramite disa^[[0m”)$
[Mar 24 08:32:59] VERBOSE[8785] pbx.c: [Mar 24 08:32:59] – Executing [329234xxxx@disa-call:2] ^[[1;36mAGI^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mkkcc/app_rmitapre.php^[[0m”) in new stack
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] – Launched AGI Script /var/lib/asterisk/agi-bin/kkcc/app_rmitapre.php
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_rmitapre.php: Sistemazione numero da chiamare…329234xxxx
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_rmitapre.php: Il numero alterato e’… 329234xxxx
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] – <SIP/348323xxxx-00000000>AGI Script kkcc/app_rmitapre.php completed, returning 0
[Mar 24 08:32:59] VERBOSE[8785] pbx.c: [Mar 24 08:32:59] – Executing [329234xxxx@disa-call:3] ^[[1;36mAGI^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mkkcc/app_callout.php^[[0m”) in new stack
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] – Launched AGI Script /var/lib/asterisk/agi-bin/kkcc/app_callout.php
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: ******* @@@@ INIZIO APP_CALLOUT @@@@ *******
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Selezione trunk per l’uscita…
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: … AUTORILEVAZIONE CHIAMATA …
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: DEVO SELEZIONARE UN TRUNK PER: MOBILI
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: ------------------ INFO CHIAMATA ------------------
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: CHIAMATO: 329234xxxx
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: IL TRUNK DI INGRESSO: 348323xxxx
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: IL CHIAMANTE: 345324xxxx
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Leggo i settings per 345324xxxx nel db
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: IL NUOVO CHIAMANTE E’ (ALIAS): 026
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Alterato deftrunk con valore presente in db: 393187xxxx->393187xxxx
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Alterato avvisononflat con valore presente in db: 1->0
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Alterato skipsec con valore presente in db: 180->180
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Alterato ppu con valore presente in db: 1;2;0->1;2;0
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Ricerca trunks con POLICYUPDATE= 1
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: ####################### ANALIZZO TRUNK: 393187xxxx #######################
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Trunk attivo in questo giorno… ha matchato la condizione: 0-3
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Trunk attivo in questo orario…I:7500 F:72000 O:30779
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: ----------------- STATO DEL TRUNK ----------------
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: DEVICE_STATE(393187xxxx): NOT_INUSE
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: EXTENSION_STATE(393187xxxx): NOT_INUSE
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: ---------------------------------------------------
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Setto opzioni corrette per la chiamata…Tr
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Il trunks è utilizzabile per questa chiamata <secondi rimasti: 460 min 54 sec > … setto TRUNKOUT : 393187xxxx
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Controllo politiche utilizzo…
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Questa trunk usa: ROUND ROBIN
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Settato nuovo peso per trunk 393187xxxx : peso=1
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] kkcc/app_callout.php: Trunk non impostato in [app_callout] oppure Username/Trunk non impostato in [users_trunks] [select elaborationbox from use$
[Mar 24 08:32:59] VERBOSE[8785] res_agi.c: [Mar 24 08:32:59] – <SIP/348323xxxx-00000000>AGI Script kkcc/app_callout.php completed, returning 0
[Mar 24 08:33:00] VERBOSE[8785] pbx.c: [Mar 24 08:33:00] – Executing [329234xxxx@disa-call:4] ^[[1;36mNoOp^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mPassando per il trunk: 393187xxxx^[[0m”)$
[Mar 24 08:33:00] VERBOSE[8785] pbx.c: [Mar 24 08:33:00] – Executing [329234xxxx@disa-call:5] ^[[1;36mDial^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35mSIP/393187xxxx/329234xxxx,300,Tt^[[0m”) $
[Mar 24 08:33:00] VERBOSE[8785] netsock.c: [Mar 24 08:33:00] == Using SIP RTP CoS mark 5
[Mar 24 08:33:00] VERBOSE[8785] app_dial.c: [Mar 24 08:33:00] – Called 393187xxxx/329234xxxx
[Mar 24 08:33:00] VERBOSE[8785] app_dial.c: [Mar 24 08:33:00] – SIP/393187xxxx-00000001 is ringing
[Mar 24 08:33:00] VERBOSE[8785] app_dial.c: [Mar 24 08:33:00] – SIP/393187xxxx-00000001 is making progress passing it to SIP/348323xxxx-00000000
[Mar 24 08:33:26] VERBOSE[8758] chan_sip.c: [Mar 24 08:33:26] > Saved useragent “C470IP022140000000” for peer 026
[Mar 24 08:33:55] VERBOSE[8758] dnsmgr.c: [Mar 24 08:33:55] > doing dnsmgr_lookup for ‘sip.messagenet.it
[Mar 24 08:33:55] VERBOSE[8758] dnsmgr.c: [Mar 24 08:33:55] > doing dnsmgr_lookup for ‘sip.poivy.com
[Mar 24 08:33:55] VERBOSE[8758] dnsmgr.c: [Mar 24 08:33:55] > doing dnsmgr_lookup for ‘sip.poivy.com
[Mar 24 08:34:12] VERBOSE[8785] pbx.c: [Mar 24 08:34:12] == Spawn extension (disa-call, 329234xxxx, 5) exited non-zero on ‘SIP/348323xxxx-00000000’
[Mar 24 08:34:12] VERBOSE[8785] pbx.c: [Mar 24 08:34:12] – Executing [h@disa-call:1] ^[[1;36mHangup^[[0m("^[[1;35mSIP/348323xxxx-00000000^[[0m", “^[[1;35m^[[0m”) in new stack
[Mar 24 08:34:12] VERBOSE[8785] pbx.c: [Mar 24 08:34:12] == Spawn extension (disa-call, h, 1) exited non-zero on ‘SIP/348323xxxx-00000000’
[Mar 24 08:34:22] VERBOSE[8783] asterisk.c: [Mar 24 08:34:22] Beginning asterisk shutdown…
[Mar 24 08:34:22] VERBOSE[8783] asterisk.c: [Mar 24 08:34:22] Executing last minute cleanups
[Mar 24 08:34:22] VERBOSE[8783] res_musiconhold.c: [Mar 24 08:34:22] == Destroying musiconhold processes

my sip.conf:

[393187xxxx] ;tre/tre 08 top 500 min settimana
progressinband=no
username=393187xxxx
regexten=393187xxxx
fromuser=393187xxxx
disallow=all
allow=alaw
allow=ulaw
context=gsm-in
host=dynamic
dtmfmode=info
language=it
type=friend
nat=no
qualify=yes
secret=xxxx
canreinvite=no
deny=0.0.0.0/0.0.0.0
permit=172.16.199.0/255.255.255.0
permit=172.16.200.0/255.255.255.0
permit=172.16.201.0/255.255.255.0
permit=172.16.254.0/255.255.255.0
insecure=invite,port
port=5060
call-limit=1

sorry for not mentioning - please post the content of the full log file when you made a call to your “busy” mobile.

what you have sent doesn’t contain log lines for such a call (I do not see the message “Sto chiamando un cellulare” in your log you have post).

Ioan.

this is new log …

thank you too much for your help

[Mar 24 09:09:00] VERBOSE[9083] pbx.c: [Mar 24 09:09:00] – Executing [329234xxxx@pdiff:1] ^[[1;36mAnswer^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35m^[[0m”) in new stack
[Mar 24 09:09:00] VERBOSE[9083] pbx.c: [Mar 24 09:09:00] – Executing [329234xxxx@pdiff:2] ^[[1;36mNoOp^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35mSto chiamando un cellulare: 329234xxxx^[[0m”) in ne$
[Mar 24 09:09:00] VERBOSE[9083] pbx.c: [Mar 24 09:09:00] – Executing [329234xxxx@pdiff:3] ^[[1;36mResetCDR^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35m^[[0m”) in new stack
[Mar 24 09:09:00] VERBOSE[9083] pbx.c: [Mar 24 09:09:00] – Executing [329234xxxx@pdiff:4] ^[[1;36mWait^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35m0.5^[[0m”) in new stack
[Mar 24 09:09:00] NOTICE[9083] channel.c: Dropping incompatible voice frame on SIP/000-00000003 of format alaw since our native format has changed to 0x4 (ulaw)
[Mar 24 09:09:01] VERBOSE[9083] pbx.c: [Mar 24 09:09:01] – Executing [329234xxxx@pdiff:5] ^[[1;36mAGI^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35mkkcc/app_callout.php^[[0m”) in new stack
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] – Launched AGI Script /var/lib/asterisk/agi-bin/kkcc/app_callout.php
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: ******* @@@@ INIZIO APP_CALLOUT @@@@ *******
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Selezione trunk per l’uscita…
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: … AUTORILEVAZIONE CHIAMATA …
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: DEVO SELEZIONARE UN TRUNK PER: MOBILI
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: ------------------ INFO CHIAMATA ------------------
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: CHIAMATO: 329234xxxx
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: IL TRUNK DI INGRESSO: 000
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: IL CHIAMANTE: 000
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Leggo i settings per 000 nel db
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: IL NUOVO CHIAMANTE E’ (ALIAS): 000
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Alterato deftrunk con valore presente in db: 393187xxxx->393187xxxx
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Alterato avvisononflat con valore presente in db: 1->0
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Alterato skipsec con valore presente in db: 180->180
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Alterato ppu con valore presente in db: 1;2;0->1;2;0
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Ricerca trunks con POLICYUPDATE= 1
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: ####################### ANALIZZO TRUNK: 393187xxxx #######################
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Trunk attivo in questo giorno… ha matchato la condizione: 0-3
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Trunk attivo in questo orario…I:7500 F:72000 O:32941
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: ----------------- STATO DEL TRUNK ----------------
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: DEVICE_STATE(393187xxxx): NOT_INUSE
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: EXTENSION_STATE(393187xxxx): NOT_INUSE
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: ---------------------------------------------------
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Setto opzioni corrette per la chiamata…Tr
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Il trunks è utilizzabile per questa chiamata <secondi rimasti: 460 min 54 sec > … setto TRUNKOUT : 393187xxxx
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Controllo politiche utilizzo…
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Questa trunk usa: ROUND ROBIN
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Settato nuovo peso per trunk 393187xxxx : peso=1
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_callout.php: Trunk non impostato in [app_callout] oppure Username/Trunk non impostato in [users_trunks] [select elaborationbox from use$
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] – <SIP/000-00000003>AGI Script kkcc/app_callout.php completed, returning 0
[Mar 24 09:09:01] VERBOSE[9083] pbx.c: [Mar 24 09:09:01] – Executing [329234xxxx@pdiff:6] ^[[1;36mAGI^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35mkkcc/app_mux.php^[[0m”) in new stack
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] – Launched AGI Script /var/lib/asterisk/agi-bin/kkcc/app_mux.php
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_mux.php: ******* @@@@ INIZIO APP_MUX @@@@ *******
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_mux.php: Il chiamante è: 000
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] kkcc/app_mux.php: Inserito nuovo dynamic mapping. CHIAMANTE: 000 CHIAMATO: 329234xxxx ID: 2
[Mar 24 09:09:01] VERBOSE[9083] res_agi.c: [Mar 24 09:09:01] – <SIP/000-00000003>AGI Script kkcc/app_mux.php completed, returning 0
[Mar 24 09:09:01] VERBOSE[9083] pbx.c: [Mar 24 09:09:01] – Executing [329234xxxx@pdiff:7] ^[[1;36mSet^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35mCALLERID(name)=393187xxxx^[[0m”) in new stack
[Mar 24 09:09:01] VERBOSE[9083] pbx.c: [Mar 24 09:09:01] – Executing [329234xxxx@pdiff:8] ^[[1;36mSet^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35mCALLERID(num)=393187xxxx^[[0m”) in new stack
[Mar 24 09:09:01] VERBOSE[9083] pbx.c: [Mar 24 09:09:01] – Executing [329234xxxx@pdiff:9] ^[[1;36mNoOp^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35mPassando per il trunk: 393187xxxx^[[0m”) in new sta$
[Mar 24 09:09:01] VERBOSE[9083] pbx.c: [Mar 24 09:09:01] – Executing [329234xxxx@pdiff:10] ^[[1;36mDial^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35mSIP/393187xxxx/329234xxxx,300,tT^[[0m”) in new sta$
[Mar 24 09:09:01] VERBOSE[9083] netsock.c: [Mar 24 09:09:01] == Using SIP RTP CoS mark 5
[Mar 24 09:09:01] VERBOSE[9083] app_dial.c: [Mar 24 09:09:01] – Called 393187xxxx/329234xxxx
[Mar 24 09:09:01] VERBOSE[9083] app_dial.c: [Mar 24 09:09:01] – SIP/393187xxxx-00000004 is ringing
[Mar 24 09:09:02] VERBOSE[9083] app_dial.c: [Mar 24 09:09:02] – SIP/393187xxxx-00000004 is making progress passing it to SIP/000-00000003
[Mar 24 09:09:26] VERBOSE[9083] pbx.c: [Mar 24 09:09:26] == Spawn extension (pdiff, 329234xxxx, 10) exited non-zero on ‘SIP/000-00000003’
[Mar 24 09:09:26] VERBOSE[9083] pbx.c: [Mar 24 09:09:26] – Executing [h@pdiff:1] ^[[1;36mHangup^[[0m("^[[1;35mSIP/000-00000003^[[0m", “^[[1;35m^[[0m”) in new stack
[Mar 24 09:09:26] VERBOSE[9083] pbx.c: [Mar 24 09:09:26] == Spawn extension (pdiff, h, 1) exited non-zero on ‘SIP/000-00000003’
[Mar 24 09:09:35] VERBOSE[9048] chan_sip.c: [Mar 24 09:09:35] – Unregistered SIP ‘393187xxxx’
[Mar 24 09:09:54] NOTICE[9048] chan_sip.c: Received SIP subscribe for peer without mailbox: 000
[Mar 24 09:09:54] NOTICE[9048] chan_sip.c: Received SIP subscribe for peer without mailbox: 000
[Mar 24 09:10:05] VERBOSE[9073] asterisk.c: [Mar 24 09:10:05] Beginning asterisk shutdown…
[Mar 24 09:10:05] VERBOSE[9073] asterisk.c: [Mar 24 09:10:05] Executing last minute cleanups
[Mar 24 09:10:05] VERBOSE[9073] res_musiconhold.c: [Mar 24 09:10:05] == Destroying musiconhold processes

Ok - here is what I see:

[quote][Mar 24 09:09:01] VERBOSE[9083] app_dial.c: [Mar 24 09:09:01] – Called 393187xxxx/329234xxxx
[Mar 24 09:09:01] VERBOSE[9083] app_dial.c: [Mar 24 09:09:01] – SIP/393187xxxx-00000004 is ringing
[Mar 24 09:09:02] VERBOSE[9083] app_dial.c: [Mar 24 09:09:02] – SIP/393187xxxx-00000004 is making progress passing it to SIP/000-00000003
[Mar 24 09:09:26] VERBOSE[9083] pbx.c: [Mar 24 09:09:26] == Spawn extension (pdiff, 329234xxxx, 10) exited non-zero on ‘SIP/000-00000003’
[Mar 24 09:09:26] VERBOSE[9083] pbx.c: [Mar 24 09:09:26] – Executing [h@pdiff:1] [/quote]

Because SIP/393187xxxx marked as ringing -> I do not think you will be able to detect that the other party is busy but we have to see what dialstatus we will receive after such a call.

In order to execute “autohangup” Macro I suggest to use Dial with “g” option, like:

[quote]tenora*CLI> show application Dial

g - Proceed with dialplan execution at the current extension if the
destination channel hangs up.

[/quote]

thank, thank thank very much… you have solved my problem :smiley: i’m afflicted by this from 10 days ago…
thank you very much
Enrico