Problem with ASM Script

Messiah Alcatel

Problem with ASM Script

Post by Messiah Alcatel »

Hello,

I wrote a simple ASM Script which does nothing else than fetching a number from a SQL-Database and using this number for forwanding the call. So the script only works as a distribution center.

I have two question:

#1 Every Call is running the script twice without increasing the sequence, so sequence 1 is done twice. Is it because there is no agent list, which is true since the script ist just forwarding calls.

#2 Not every call is calling up the script, there are calls which do not enter the script by any means and are just ended. I programmed a reflexiv habit, so the call could re-enter the same routing pilot or forward it to another routing pilot by which the call could find a resource to be answered; a activated an alternativ routing, but nothing's helping at all.

The script is

/*----------------------------------------------------
Generated by ASMScriptEditor

----------------------------------------------------*/

DB[%1] = USE_DATABASE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

START
RESELECTION_TIMEOUT = %240
IF (DB[%1] <> NULL)
STRING [%2] = CALLTAG
STRING [%3] = "0"
SQL_REQUEST DB[%1]
CALL "Prcedure_name" (IN CALLED, IN CALLING, IN STRING [%2], OUT STRING[%3])
IF (SQL_RESULT = SQL_SUCCESS)
APPLY
RULE_REDIRECTION STRING[%3]
ELSE
APPLY
RULE_REDIRECTION Same/Other Routing Pilot
ENDIF
ELSE
APPLY
RULE_REDIRECTION Same/Other Routing Pilot
ENDIF
END

Cna anyone give a ma hint, what the reason could be?
User avatar
tot3nkopf
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 4058
Joined: 02 Feb 2006 10:41
Location: Germany & Romania
Contact:

Re: Problem with ASM Script

Post by tot3nkopf »

1# For which reason are you using the reselection timeout?
2# All your external calls are routed to the statistical pilot prior to pilot routing?
Messiah Alcatel

Re: Problem with ASM Script

Post by Messiah Alcatel »

Hello Totenkopf,

#1 I used it, becaused i hope to rid of the double call up of the script, that's the only reason, but neither with nor without Reselection TO the double call can be avoided

#2 All calls are ar incoming calls on the statistic pilot which is associated with the routing pilot. Theres is no redirection or forwarding from another pilot: Client calls number which is the statistical pilot and the statistical pilot should run the ASM Script.
User avatar
tot3nkopf
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 4058
Joined: 02 Feb 2006 10:41
Location: Germany & Romania
Contact:

Re: Problem with ASM Script

Post by tot3nkopf »

Can you show us teh output for debugger for a call, using the script without the reselection timeout?
Messiah Alcatel

Re: Problem with ASM Script

Post by Messiah Alcatel »

Since one call runs the script twice here the debug output with the exact same data

17h58:04 ----------------------
NODE = 1
NEQT = 3114
SEQUENCE = 1
CALLING = 123456789
CALLED = 123
CALLTAG = 123
PILOT_NUMBER = 1234567
WAITING_ROOM_NUMBER = 987456
WAIT = 0
EXPECTED_WAITING_TIME = 0
PRIORITY = 255
CALL_TYPE = 0
LANGUAGE = 3
AGENT_NUMBER =
CHARACTERISTICS_LIST =

Skill:108/Name Expertise Level required:1 Mandatory:TRUE Domain priority:-1

DB[%1] = USE_DATABASE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
START
STRING[%2] = CALLTAG
IF (DB[%1] <> NULL) TRUE
STRING[%3] = "0"
SQL_REQUEST DB[%1]
CALL "WTL_auslesen_und_loggen" (IN CALLED, IN CALLING, IN STRING[%2], OUT STRING[%3])
IF (SQL_RESULT = SQL_SUCCESS) TRUE
APPLY RULE_REDIRECTION STRING[3]
ENDIF
ENDIF
END

PRIORITY = -1
RESELECTION_TIMEOUT = 65535
LANGUAGE = 3
CALLTAG = 123
DISPLAY_AGENT =

Used Rules :
Redirection (666123)
AGENTS_LIST :
no agent



17h58:04 ----------------------
NODE = 1
NEQT = 3114
SEQUENCE = 1
CALLING = 123456789
CALLED = 123
CALLTAG = 123
PILOT_NUMBER = 1234567
WAITING_ROOM_NUMBER = 987456
WAIT = 0
EXPECTED_WAITING_TIME = 0
PRIORITY = 255
CALL_TYPE = 0
LANGUAGE = 3
AGENT_NUMBER =
CHARACTERISTICS_LIST =

Skill:108/Name Expertise Level required:1 Mandatory:TRUE Domain priority:-1

DB[%1] = USE_DATABASE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
START
STRING[%2] = CALLTAG
IF (DB[%1] <> NULL) TRUE
STRING[%3] = "0"
SQL_REQUEST DB[%1]
CALL "WTL_auslesen_und_loggen" (IN CALLED, IN CALLING, IN STRING[%2], OUT STRING[%3])
IF (SQL_RESULT = SQL_SUCCESS) TRUE
APPLY RULE_REDIRECTION STRING[3]
ENDIF
ENDIF
END

PRIORITY = -1
RESELECTION_TIMEOUT = 65535
LANGUAGE = 3
CALLTAG = 123
DISPLAY_AGENT =

Used Rules :
Redirection (666123)
AGENTS_LIST :
no agent
User avatar
tot3nkopf
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 4058
Joined: 02 Feb 2006 10:41
Location: Germany & Romania
Contact:

Re: Problem with ASM Script

Post by tot3nkopf »

What is 666123 in your PBX? Can you call this number from a phone set?

I sqw you are calling 123 and then redirecting to 666123. Is this the same pilot number? Can you test reditection with an extension number?
Messiah Alcatel

Re: Problem with ASM Script

Post by Messiah Alcatel »

I changed the numbers, but the logic is the same:

123 is st statistic pilot, which has been called
666123 is a routing pilot which cann not be called external but only internal; in order to have an inner logic within the numbers, the routing pilot on which the statisc pilot shall be distributed contains a "prefix" which is 666.

the same pilot numver would be a different, the ASM script runs on the routing pilot with the number 666945; the redirection when call of the SQL-Procedure fails goes on the 666945 or to another pilot 666940; but the call of the sql-procedure has never failed.

So, it is not clear why tha ASM Script runs twice without increasing the sequence and it is not clear why there calls which do obviuosly not enter the script, since they are ended immediately.
User avatar
tot3nkopf
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 4058
Joined: 02 Feb 2006 10:41
Location: Germany & Romania
Contact:

Re: Problem with ASM Script

Post by tot3nkopf »

Let me get this straight:
1. ext call --> stat pil 123 --> pil 666123 --> smth
2.The script is applied to the pilot 666123 (scripts are not appended to statistic pilots but to pilot numbers)
3. In some scenarios you redirect to the same pilot number 666123 to which the call arrived?
4. The script is appended also to the 666945 to which the calls are sometimes redirected...????
?
I have also a different question for you: what are you trying to achieve?
Messiah Alcatel

Re: Problem with ASM Script

Post by Messiah Alcatel »

Obviously, I din't make myself clear:

1. external call on stat pil 123
2. stat pil 123 is associated with routing pil 666945
3. ASM is running and is getting the redirtection number via an sql proc
4. if there is no problem stat pil 123 will be redirected to routing pilot 666123

The aim is to use routing pilot 666945 as a distribution center which is redirecting the call of a bigger amount of stat pils (which are associated with the routing pil 666945) under varies circumstances which are evaluated within the sql proc to different routing pil and make a log of this

It works for 98%-99% of the calls fine, but there are a little amount of calls which are not entering the asm script which are ended directly on the distributing pilot 666945.
I added an alternativ routing for calls within the asm script so that if the sql proc fails the call either enters agains 666945 (as to say it should be a retry) or is redirected to another routing pilot where the call could be answered, and a normal alternativ routing using with a new waiting room etc.
But neither the one solution nor the other is capturing the failed calls. They are still just ended. But i don't know why and how to avoid it.

And then there's the other question which is, why ervy call is run the script twice without changing the sequence.

I hope i explained myself better
User avatar
tot3nkopf
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 4058
Joined: 02 Feb 2006 10:41
Location: Germany & Romania
Contact:

Re: Problem with ASM Script

Post by tot3nkopf »

In the debugger the call appear as redirected to 666123:

Used Rules :
Redirection (666123)

Can you post a debugger output for a successful and one for an unsuccessful call?
Post Reply

Return to “Beginner's questions about the (4400 / Enterprise) PHONE APPLICATION or OPERATING SYSTEM”