Page 1 of 1

Where this 9 is coming from?

PostPosted: Tue Oct 09, 2007 6:10 pm
by faisal_ashraf
hi matt,

i just installed another box with vicidial_scratch i am having this problem with 1st vici box also with this one.

here is my dial out context.

Context 1
; dial a local 646 outbound number with area code
exten => _1NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _1NXXNXXXXXX,2,Dial,SIP/${EXTEN:1}@PTCL||tTo)
exten => _1NXXNXXXXXX,3,Hangup

Context 2
; dial a local 646 outbound number with area code
exten => _.1NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _.1NXXNXXXXXX,2,Dial,SIP/${EXTEN:1}@PTCL||tTo)
exten => _.1NXXNXXXXXX,3,Hangup

Problem:

when i use Context No. 1 i get invalid option message on my phone. because it adds 9 before my number as on campaign i have Prefix=1 set
and EXTEN:1 is there.

But when i use Context No.2 it works fine.

The problem with Context No.2 is when i hit transfer either to any of available transfer group it goes to make an outbound call instead of dialing local ext. number. it dials 90009***
CLI>
-- Executing AGI("SIP/192.168.100.182-09752bd8", "agi://127.0.0.1:4577/call_log") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing Dial("SIP/192.168.100.182-09752bd8", "SIP/90009*CL_103_B_L**1429**3129226500*8365*@PTCL") in new stack
Oct 10 03:58:58 WARNING[22882]: chan_sip.c:1997 create_addr: No such host: PTCL
Oct 10 03:58:58 NOTICE[22882]: app_dial.c:1076 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Hangup("SIP/192.168.100.182-09752bd8", "") in new stack
== Spawn extension (default, 990009*CL_103_B_L**1429**3129226500*8365*, 3) exited non-zero on 'SIP/192.168.100.182-09752bd8'
-- Executing AGI("SIP/192.168.100.182-09752bd8", "agi://127.0.0.1:4577/call_log") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing Dial("SIP/192.168.100.182-09752bd8", "SIP/@PTCL") in new stack
Oct 10 03:58:58 WARNING[22882]: chan_sip.c:1997 create_addr: No such host: PTCL
Oct 10 03:58:58 NOTICE[22882]: app_dial.c:1076 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Hangup("SIP/192.168.100.182-09752bd8", "") in new stack
== Spawn extension (default, h, 3) exited non-zero on 'SIP/192.168.100.182-09752bd8'


Also if i use ,,tTo) call don't go through so i used || and it worked with that.

I am working my level best to solve this problem but i failed to do so.

I bought the Manager Manual with Agent Manual so i make sure to follow the right configs but i am stuck here.

I comment out all of dialout contexts to make sure its not using any other one.

Does it has anything to do with Asterisk version?
My Configuration is. FC6, Mysql5, PHP5, perl-5.8.8-10, Asterisk 1.2.24.asterisk-perl-0.08, zaptel-1.2.20.1, libpri-1.2.5, astguiclient_2.0.3.

it was causing so many problem when i was trying to install zaptel version which was recommended in scratch_install

I am on a dead line here so i need help badly.

Thanks in Advance



CLI this is the response. with Context No.1

> Channel SIP/120-0a0b7ff8 was answered.
== Starting SIP/120-0a0b7ff8 at default,916467231856,1 failed so falling back to exten 's'
== Starting SIP/120-0a0b7ff8 at default,s,1 still failed so falling back to context 'default'
-- Sent into invalid extension 's' in context 'default' on SIP/120-0a0b7ff8
-- Executing Playback("SIP/120-0a0b7ff8", "invalid") in new stack
-- Playing 'invalid' (language 'en')
== Manager 'sendcron' logged off from 127.0.0.1
== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'sendcron' logged on from 127.0.0.1
-- Executing DeadAGI("SIP/120-0a0b7ff8", "agi://127.0.0.1:4577/call_log") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing DeadAGI("SIP/120-0a0b7ff8", "agi://127.0.0.1:4577/VD_hangup--HVcauses--PRI-----NODEBUG-----16---------------)") in new stack
-- AGI Script agi://127.0.0.1:4577/VD_hangup--HVcause ... ----------) completed, returning 0

PostPosted: Tue Oct 09, 2007 9:25 pm
by Op3r
Take a look at your campaigns manager. It adds 9 automatically when you create a campaign.

Please take your time reading the Manager's Manual :)

cheers :)

PostPosted: Wed Oct 10, 2007 1:29 pm
by faisal_ashraf
Hi Op3r,

thanks for the reply ....if you look on my post i did mentioned that:

Problem:

when i use Context No. 1 i get invalid option message on my phone. because it adds 9 before my number. On campaign i have Prefix=1 set
and EXTEN:1 is there.


i made one campaign then i made another on both of them i Removed 9 and added 1 but again when i use context with _1NXXX it adds 9. when i use context _.1NXXX it works but loses the vicidial functionality.

Help needed...

Well i am going through with the manual.... but this is something which after looking at sooooooooooooooooo many posts on form i found out that i am the only one having this issue. once i get rid of this issue then i can go on to the next step but i can still use PD with option 2 context and works fine but i know i need transfer call option which i cant do it with that.

even i confirmed it from the database;
Edit Delete TESTCAMP Test Campaign for Vicidial Y DOWN Y 5 0 oldest_call_finish 24hours 60 1 6467231856 8365 8309 ONDEMAND FULLDATE_CUSTPHONE NONE N N Y NONE 5 N 8307 Y 0 Wrapup Call N 0 N MANUAL Y 3 3.0 2100 0 0 AUTO NONE B N NA DC - N 2007-10-10 23:17:28 N 2007-10-10 02:10:13 NEW - N N
Edit Delete 100_B Bgroup Campaign Y DOWN Y 5 0 oldest_call_finish 24hours 60 1 0000000000 8365 8309 ONDEMAND FULLDATE_CUSTPHONE NONE N CXFER CXFER N N NONE 5 N 8307 Y 0 Wrapup Call CL_100_B_L - N 0 Y MANUAL Y 3 3.0 2100 0 0 AUTO NONE B N NA DC - N 2007-10-10 02:49:24 N 2007-10-09 04:04:18

PostPosted: Wed Oct 10, 2007 5:14 pm
by mflorell
in the Campaign Detail Modify screen, set the dial prefix to "X"

That will remove the 9 from the beginning of the dialed number when the call is placed.

PostPosted: Wed Oct 10, 2007 5:57 pm
by faisal_ashraf
hi matt,

I done that also no use same result.

PostPosted: Wed Oct 10, 2007 8:10 pm
by bobbymc
i know exacly what problem your having.. i had the same issue.. for some odd reason the number 9 is hard coded in some of the backend scritps the client side talks to.. i belive its vdc_db_query.php

$Local_out_prefix = '9';

matt can u explain why the 9 is hard coded?

PostPosted: Wed Oct 10, 2007 9:31 pm
by mflorell
It was hard-coded in several years ago because VICIDIAL is based on astguiclient which is a corporate phone system utility and dialing 9 for outside numbers was the standard. It would not be difficult to remove this, but it would effect many installed systems to do that which is why I have not done that.

It is really not that difficult to add a single Goto line to your dial plan to deal with this if you are having problems.

PostPosted: Wed Oct 10, 2007 9:38 pm
by bobbymc
true true.. but its hard for theos that dont evne know what their doing setting up vicidial and going with the step by step instructions.. their jsut made so well that any idiot can setup vicidial =)

PostPosted: Thu Oct 11, 2007 11:30 am
by enjay
Context 1
; dial a local 646 outbound number with area code
exten => _1NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _1NXXNXXXXXX,2,Dial,SIP/${EXTEN:1}@PTCL||tTo)
exten => _1NXXNXXXXXX,3,Hangup

Context 2
; dial a local 646 outbound number with area code
exten => _.1NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _.1NXXNXXXXXX,2,Dial,SIP/${EXTEN:1}@PTCL||tTo)
exten => _.1NXXNXXXXXX,3,Hangup


how does your second priority work?

shouldnt these be exten => _1NXXNXXXXXX,2,Dial(SIP/${EXTEN:1}@PTCL||tTo)

note the open parenthesis

PostPosted: Thu Oct 11, 2007 2:36 pm
by faisal_ashraf
mflorell wrote:It is really not that difficult to add a single Goto line to your dial plan to deal with this if you are having problems.


can you give any example what it would be ? its not coming into my mind.



bobbymc wrote:true true.. but its hard for theos that dont evne know what their doing setting up vicidial and going with the step by step instructions.. their jsut made so well that any idiot can setup vicidial =)


Not every one is coder here you cannot expect from every to know every thing. No buddy is perfect.
enjay wrote:how does your second priority work?

shouldnt these be exten => _1NXXNXXXXXX,2,Dial(SIP/${EXTEN:1}@PTCL||tTo)

note the open parenthesis

Done Same result.


bobbymc wrote:i know exacly what problem your having.. i had the same issue.. for some odd reason the number 9 is hard coded in some of the backend scritps the client side talks to.. i belive its vdc_db_query.php
$Local_out_prefix = '9';


Done that modified the file removed 9 you know what is the funny thing?
it dials 9 again :)

> Channel SIP/gs102-08460dd0 was answered.
== Starting SIP/gs102-08460dd0 at default,916467231856,1 failed so falling back to exten 's'
== Starting SIP/gs102-08460dd0 at default,s,1 still failed so falling back to context 'default'
-- Sent into invalid extension 's' in context 'default' on SIP/gs102-08460dd0
-- Executing Playback("SIP/gs102-08460dd0", "invalid") in new stack
-- Playing 'invalid' (language 'en')
== Manager 'sendcron' logged off from 127.0.0.1
== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'sendcron' logged on from 127.0.0.1
-- Executing DeadAGI("SIP/gs102-08460dd0", "agi://127.0.0.1:4577/call_log") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing DeadAGI("SIP/gs102-08460dd0", "agi://127.0.0.1:4577/VD_hangup--HVcauses--PRI-----NODEBUG-----16---------------)") in new stack
-- AGI Script agi://127.0.0.1:4577/VD_hangup--HVcause ... ----------) completed, returning 0

Any Idea how to resolve this issue sorry to bother you guys so much..

9 Gone

PostPosted: Thu Oct 11, 2007 3:45 pm
by faisal_ashraf
ok i try restarting apache then asterisk then server and 9 is gone.

while i was modifying the the vdc_db_query.php i found this.

faisal_ashraf wrote:
if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';}

"vdc_db_query.php" line 581


shouldn't be X instead of x or it is case insensitive ?

and i think modifying that file did the job..... i hope now i can move further.

PostPosted: Fri Oct 12, 2007 10:28 am
by mflorell
the "x" is not case sensitive because it is a PHP eregi.