Asterisk DID incoming rules =s

asterisksipvoip

So I have a 10 way SIP trunk from a UK provider. Calls in and out work fine, but as I have multiple numbers for different purposes I set up the inbound rules for each number but they never work, only the catch all number works. In the CLI when a call comes in I get this:

Executing [s@from-trunk:1] Set("SIP/Entanet-0000014f", "__FROM_DID=s") in new stack
Executing [s@from-trunk:2] ExecIf("SIP/Entanet-0000014f", "0 ?Set(CALLERID(name)=01299404193)") in new stack
Executing [s@from-trunk:7] Goto("SIP/Entanet-0000014f", "timeconditions,1,1") in new stack

The important bit i guess is "__FROM_DID=s" why is it "s" and not the DID? I talked to my provider and they DO send the DID in the SIP headers. What could be wrong with my settings or what?

My PEER details:

username=443331010040
type=peer
secret=***********
qualify=yes
nat=always
insecure=very
host=proxy.entacall.com
fromuser=443331010040
fromdomain=mydomain.com
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=yes
authuser=443331010040
allow=ulaw

My incoming context details:

type=user
secret=**********
context=from-trunk

Reg string: 443331010040:************@proxy.entacall.com

Hope you can help!?

Best Answer

That looks like a script error to me, not a settings error. It's reporting that a script is setting __FROM_DID equal to s, not necessarily that the call details from the provider says 's'.

To route different incoming numbers for different purposes, I have extensions.ael with content like:

context incoming-calls {
    441234000000 => {
        Answer();
        Dial(SIP/100,120);
    }

    441234000001 => {
        Answer();
        Dial(SIP/101, 120);
    }
}

Are you using AEL? Do you have incoming call numbers starting 44 instead of 0?