[RESOLVED] Getting DID provider DIDww working on Asterisk1.8

Hi guys,

I purchased a few numbers from DIDww and therefore implemented their settings in my SIP.conf:

[DIDww](!)
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=inbound
insecure=invite,port
nat=never

; Inbound calls from DIDWW
;
[DIDWW_46.19.209.10](DIDww)
host=46.19.209.10

[DIDWW_46.19.209.11](DIDww)
host=46.19.209.11

[DIDWW_46.19.209.12](DIDww)
host=46.19.209.12

[DIDWW_46.19.209.13](DIDww)
host=46.19.209.13

[DIDWW_46.19.209.14](DIDww)
host=46.19.209.14

[DIDWW_46.19.209.15](DIDww)
host=46.19.209.15

[DIDWW_46.19.209.75](DIDww)
host=46.19.209.75

[DIDWW_46.19.209.76](DIDww)
host=46.19.209.76

[DIDWW_46.19.209.77](DIDww)
host=46.19.209.77

[DIDWW_46.19.209.78](DIDww)
host=46.19.209.78

[DIDWW_46.19.209.79](DIDww)
host=46.19.209.79

[DIDWW_46.19.209.80](DIDww)
host=46.19.209.80

[DIDWW_46.19.210.10](DIDww)
host=46.19.210.10

[DIDWW_46.19.210.11](DIDww)
host=46.19.210.11

[DIDWW_46.19.210.12](DIDww)
host=46.19.210.12

[DIDWW_46.19.210.13](DIDww)
host=46.19.210.13

[DIDWW_46.19.210.14](DIDww)
host=46.19.210.14

[DIDWW_46.19.210.15](DIDww)
host=46.19.210.15

[DIDWW_46.19.210.75](DIDww)
host=46.19.210.75

[DIDWW_46.19.210.76](DIDww)
host=46.19.210.76

[DIDWW_46.19.210.77](DIDww)
host=46.19.210.77

[DIDWW_46.19.210.78](DIDww)
host=46.19.210.78

[DIDWW_46.19.210.79](DIDww)
host=46.19.210.79

[DIDWW_46.19.210.80](DIDww)
host=46.19.210.80

This seems long to you? To me too! But it’s already optimised from didww.com/Knowledgebase/how … _asterisk/

Allright, this is not the only DID provider set up in my config (sip.conf, some lines below):

; Inbound calls from freephonie.net
[sipfree_inbound]
type = peer
host = freephonie.net
context = inbound

This last one works pretty well.

In the extensions.conf

[inbound]
;
; Regular expressions to get callerID
;
exten => s,1,Set(test=${SIP_HEADER(TO)})
same => n,Set(test2=${CUT(test,@,1)})
same => n,Set(test3=${CUT(test2,\:,2)})
same => n,Set(CALLERID(name)="${test3} : ${CONTEXT}")
same => n,Set(int=${SIP_HEADER(FROM)})
same => n,Set(int2=${CUT(int,@,1)})
same => n,Set(int3=${CUT(int2,\:,2)})
same => n,Set(CALLERID(name)="${CONTEXT} : ${int3}")
same => n,Goto(IVR1,s,1)

console output while calling on the corresponding (freephonie)DID

 == Using SIP RTP CoS mark 5
    -- Called SIP/idtexpress/+339XXXX1556
    -- SIP/idtexpress-0000010b is making progress passing it to SIP/0001-0000010a
  == Using SIP RTP CoS mark 5
    -- Executing [s@inbound:1] Set("SIP/sipfree_inbound-0000010c", "test=<sip:09XXXX1556@172.17.20.241;user=phone>") in new stack
    -- Executing [s@inbound:2] Set("SIP/sipfree_inbound-0000010c", "test2=<sip:09XXXX1556") in new stack
    -- Executing [s@inbound:3] Set("SIP/sipfree_inbound-0000010c", "test3=09XXXX1556") in new stack
    -- Executing [s@inbound:4] Set("SIP/sipfree_inbound-0000010c", "CALLERID(name)="09XXXX1556 : inbound"") in new stack
    -- Executing [s@inbound:5] Set("SIP/sipfree_inbound-0000010c", "int="0013154587682" <sip:0013154587682@freephonie.net;user=phone>;tag=22368-NO-0cd7581b-0d0c65421") in new stack
    -- Executing [s@inbound:6] Set("SIP/sipfree_inbound-0000010c", "int2="0013154587682" <sip:0013154587682") in new stack
    -- Executing [s@inbound:7] Set("SIP/sipfree_inbound-0000010c", "int3=0013154587682") in new stack
    -- Executing [s@inbound:8] Set("SIP/sipfree_inbound-0000010c", "CALLERID(name)="inbound : 0013154587682"") in new stack
    -- Executing [s@inbound:9] Goto("SIP/sipfree_inbound-0000010c", "IVR1,s,1") in new stack
    -- Goto (IVR1,s,1)

However, any calls to the DIDww DIDs fail

 == Using SIP RTP CoS mark 5
    -- Called SIP/sipfree_sortant/+331XXXX4000
  == Using SIP RTP CoS mark 5
[2014-09-15 21:39:42] NOTICE[6658]: chan_sip.c:22147 handle_request_invite: Call from 'DIDWW_46.19.210.14' (46.19.210.14:5060) to extension '331XXXX4000' rejected because extension not found in context 'inbound'.
    -- SIP/sipfree_sortant-0000010e is making progress passing it to SIP/0001-0000010d
    -- Got SIP response 480 "Temporarily Not Available" back from 212.27.52.5:5060
    -- SIP/sipfree_sortant-0000010e is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)

It looks to me that the exten => s in extensions.conf is not able to catch any incoming number. The expected behavior is that exten => s catches all incoming numbers.

Any idea why it’s not like this?

Thanks in advance (:

‘s’ don’t catch anything, if you want to catch numbers use a pattern matching.

like exten => _331XXXXXXXX,1,blalablal

The purpose of s is to catch NO incoming number (e.g. an analogue FXO line, or a SIP INVITE with no user part).

Nice catch!

It indeed is working (:

I used “_X.” to catch all, but maybe is there a more “clean” way to achieve this?

Passing the thread to resolved anyway…

[quote=“navaismo”]use a pattern matching.

like exten => _331XXXXXXXX,1,blalablal[/quote]