Where this 9 is coming from?

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Where this 9 is coming from?

Postby faisal_ashraf » Tue Oct 09, 2007 6:10 pm

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
faisal_ashraf
 
Posts: 33
Joined: Fri Sep 21, 2007 4:18 pm
Location: Karachi, Pakistan

Postby Op3r » Tue Oct 09, 2007 9:25 pm

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 :)
Get paid for US outbound Toll Free calls. PM me.
Op3r
 
Posts: 1432
Joined: Wed Jun 07, 2006 7:53 pm
Location: Manila

Postby faisal_ashraf » Wed Oct 10, 2007 1:29 pm

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
faisal_ashraf
 
Posts: 33
Joined: Fri Sep 21, 2007 4:18 pm
Location: Karachi, Pakistan

Postby mflorell » Wed Oct 10, 2007 5:14 pm

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.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby faisal_ashraf » Wed Oct 10, 2007 5:57 pm

hi matt,

I done that also no use same result.
faisal_ashraf
 
Posts: 33
Joined: Fri Sep 21, 2007 4:18 pm
Location: Karachi, Pakistan

Postby bobbymc » Wed Oct 10, 2007 8:10 pm

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?
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Postby mflorell » Wed Oct 10, 2007 9:31 pm

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.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby bobbymc » Wed Oct 10, 2007 9:38 pm

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 =)
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Postby enjay » Thu Oct 11, 2007 11:30 am

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
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby faisal_ashraf » Thu Oct 11, 2007 2:36 pm

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..
faisal_ashraf
 
Posts: 33
Joined: Fri Sep 21, 2007 4:18 pm
Location: Karachi, Pakistan

9 Gone

Postby faisal_ashraf » Thu Oct 11, 2007 3:45 pm

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.
faisal_ashraf
 
Posts: 33
Joined: Fri Sep 21, 2007 4:18 pm
Location: Karachi, Pakistan

Postby mflorell » Fri Oct 12, 2007 10:28 am

the "x" is not case sensitive because it is a PHP eregi.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 146 guests