Expression parsing in Solaris 10


Greetings to All.

A little background about what I am trying to do, and please excuse the length of this post.

I am setting up a voicemail (VM) system based on Asterisk. From what I’ve heard Vonage uses Asterisk as their VM platform as well. I am running 1.2beta with a MYSQL backend for extensions and VM user info. All the sound files and vm messages are being stored through an NFS mount externally. The reason for this is that there will be several asterisk VM frontends, all accessing the same config and vm user info as well as sounds files.

The customer’s CALLERIDNUM is the same as their vm mailbox. I need to be able to recognize when a customer calls his own mailbox, ie. when CALLERIDNUM equals VMID (VM mailbox) so that the customer can be directed to his or her vm mailbox. So far I have not been able to get this to work on Solaris 10. It works perfectly on SUSE 9.3.

Here is what I have tried (the format may be strange to some, but this is for insertion into the mysql db):

priority=‘3’,app=‘set’,appdata=‘sanity=$[${vmid} = ${cid}]’; priority=‘4’,app=‘noop’,appdata=’${sanity}’;

-- Executing Set("SIP/", "vmid=03413306999")
-- Executing Set("SIP/", "cid=03413306999")
-- Executing set("SIP/", "sanity=0")
-- Executing noop("SIP/", "0")
-- Executing gotoif("SIP/", "0?10:20")
-- Goto (default,03413306999,20)
-- Executing playback("SIP/", "vm-intro")
-- Playing 'vm-intro' (language 'en')

Call comes in, and the two variables are set. This has bee verified with noop in previous attempts. Since I cannot spoof CALLERIDNUM, I am just creating my own fake cid variable. I can also see CALLERIDNUM come in fine so I can use this later.

Sanity is just a variable to keep track of whether or not cid and vmid are equal. IN this case they are, so the statement is true, and sanity should be equal to 1 as per the asrterisk variables and expressions wiki pages. But in this case sanity=0 so the gotoif statement is false. Screwing the rest of the vm routine. Gotoif works the way it should if I put in a zero (for false), or 1 (for true), going to the appropriate lines. I have also tried doing some arithmetic, but asterisk does not want parse thsi correctly either.

It seems that there is a problem with Asterisk 1.2 and parsing expressions, at least on Solaris 10. I have copied my config to Asterisk 1.0.9 running SUSE, and it works flawlessly, just as expected. I also installed 1.2beta on another SUSE 9.3 box, and the expression parses with no problems.

Does any one have any ideas?

Regards to all,


Maybe this could help?: