Routing incoming calls to IVR

Having a problem with incoming calls.

My register string is "4685XXXXXXX:[email protected]/100". It will transfer the call to my extension 100. Works.

Okay, so now I want all calls to be routed to IVR. Setting the register string to "4685XXXXXXX:[email protected]" gives a “bye” and then my box hangs up the phone call.

Setting the register string to my incoming phone number, "4685XXXXXXX:[email protected]/4685XXXXXXX" doesn’t work. Have also tried to set inbound routes DID to 4685XXXXXXX but I only get an operator at my voip operator saying that the number can’t be reached.

Setting the register string to "4685XXXXXXX:[email protected]/9999" and inbound routes DID to 9999 gives an error. My voip operator says the number can’t be reached.

Clearing the register string and manual adding a correct one in sip.conf doesn’t change anything. Same error.

So what am I doing wrong?
Everything is working alright when I use “/100” or “/200” that is my extensions. When I type from the inside 7777, I get to my IVR without problem.

Am using FreePBX 2.2.1 with TrixBox 2.2. Asterisk 1.2.18 with all updates from CentOS 4.5 installed.
My voip provider has a small guide for asterisk here. I haven’t followed this guide beacuse I have a working configuration already from basic installation.

Sorry for bumping, but do anyone have an answer?

turn on sip debug to see how the call is coming in. According to your provider, if you put a / at the end of your register string then it should send that as the did and if you are routing properly it should work.

Having the register string 4685XXXXXXX:[email protected]/4685XXXXXXX. Enabled sip debug and got this:

code has been modified to hide my phone numbers

[code:1]
<-- SIP read from 192.168.10.100:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.2:5060;branch=z9hG4bK30d592bc;received=192.168.10.2;rport=5060
From: “Unknown” sip:[email protected];tag=as05b56d63
Call-ID: [email protected]
CSeq: 102 OPTIONS
To: sip:[email protected];tag=1108055643148664060
Supported: timer, replaces
Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, NOTIFY, REFER, INFO
Server: RIX67GW2/exp-4-0-3-x (Apr 12 2007)
Content-Length: 0

— (10 headers 0 lines) —
Destroying call '28267d680[email protected]
trixbox*CLI>
<-- SIP read from 192.168.10.100:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.2:5060;branch=z9hG4bK0c905495;received=192.168.10.2;rport=5060
From: “Unknown” sip:[email protected];tag=as56f2b078
Call-ID: [email protected]
CSeq: 102 OPTIONS
To: sip:[email protected];tag=1108055643148664060
Supported: timer, replaces
Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, NOTIFY, REFER, INFO
Server: RIX67GW2/exp-4-0-3-x (Apr 12 2007)
Content-Length: 0

— (10 headers 0 lines) —
Destroying call '[email protected]
trixbox*CLI>
<-- SIP read from 62.80.200.53:5060:
INVITE sip:[email protected] SIP/2.0
Record-Route: sip:62.80.200.53;ftag=e9852fba0cf9dbdbe15b96b702f7de01;lr
Via: SIP/2.0/UDP 62.80.200.53;branch=z9hG4bK6d5a.78fc3a264ef0f150dbe63a603fcb89bb.0
Via: SIP/2.0/UDP 62.80.200.53:5061;branch=z9hG4bK2600e5797bc478001ced7e8d60384797;rport=5061
Max-Forwards: 16
From: sip:[email protected];tag=e9852fba0cf9dbdbe15b96b702f7de01
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 200 INVITE
Contact: Anonymous sip:62.80.200.53:5061
Expires: 300
User-Agent: Sippy
cisco-GUID: 4111820133-525472220-3107127311-4157622960
h323-conf-id: 4111820133-525472220-3107127311-4157622960
Content-Length: 415
Content-Type: application/sdp

v=0
o=Sippy 137785388 0 IN IP4 62.80.200.53
s=SIP Call
t=0 0
m=audio 52478 RTP/AVP 18 4 98 99 2 8 0 3 101
c=IN IP4 62.80.200.53
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=yes
a=rtpmap:98 G726-16/8000
a=rtpmap:99 G726-24/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

— (16 headers 18 lines) —
Using INVITE request as basis request - [email protected]
Sending to 62.80.200.53 : 5060 (non-NAT)
Found peer 'CellipOUT’
Found RTP audio format 18
Found RTP audio format 4
Found RTP audio format 98
Found RTP audio format 99
Found RTP audio format 2
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 3
Found RTP audio format 101
Peer audio RTP is at port 62.80.200.53:52478
Found description format G729
Found description format G723
Found description format G726-16
Found description format G726-24
Found description format G726-32
Found description format PCMA
Found description format PCMU
Found description format GSM
Found description format telephone-event
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x11f (g723|gsm|ulaw|alaw|g726|g729)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Looking for 4685XXXXXXX in from-sip-external (domain 192.168.10.2)
list_route: hop: sip:62.80.200.53;ftag=e9852fba0cf9dbdbe15b96b702f7de01;lr
Transmitting (NAT) to 62.80.200.53:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 62.80.200.53;branch=z9hG4bK6d5a.78fc3a264ef0f150dbe63a603fcb89bb.0;received=62.80.200.53
Via: SIP/2.0/UDP 62.80.200.53:5061;branch=z9hG4bK2600e5797bc478001ced7e8d60384797;rport=5061
From: sip:[email protected];tag=e9852fba0cf9dbdbe15b96b702f7de01
To: sip:[email protected]
Call-ID: [email protected]0.58
CSeq: 200 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:[email protected]
Content-Length: 0


Transmitting (NAT) to 62.80.200.53:5060:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 62.80.200.53;branch=z9hG4bK6d5a.78fc3a264ef0f150dbe63a603fcb89bb.0;received=62.80.200.53
Via: SIP/2.0/UDP 62.80.200.53:5061;branch=z9hG4bK2600e5797bc478001ced7e8d60384797;rport=5061
From: sip:[email protected];tag=e9852fba0cf9dbdbe15b96b702f7de01
To: sip:[email protected];tag=as3fddf795
Call-ID: [email protected]
CSeq: 200 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:[email protected]
Content-Length: 0


We’re at 192.168.10.2 port 18720
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 62.80.200.53:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 62.80.200.53;branch=z9hG4bK6d5a.78fc3a264ef0f150dbe63a603fcb89bb.0;received=62.80.200.53
Via: SIP/2.0/UDP 62.80.200.53:5061;branch=z9hG4bK2600e5797bc478001ced7e8d60384797;rport=5061
Record-Route: sip:62.80.200.53;ftag=e9852fba0cf9dbdbe15b96b702f7de01;lr
From: sip:[email protected];tag=e9852fba0cf9dbdbe15b96b702f7de01
To: sip:[email protected];tag=as3fddf795
Call-ID: [email protected]
CSeq: 200 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:[email protected]
Content-Type: application/sdp
Content-Length: 238

v=0
o=root 3587 3587 IN IP4 192.168.10.2
s=session
c=IN IP4 192.168.10.2
t=0 0
m=audio 18720 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -


trixboxCLI>
<-- SIP read from 62.80.200.53:5060:
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 62.80.200.53;branch=z9hG4bK6d5a.f3cf9fd658a4f53802c58dd847ef6db9.0
Via: SIP/2.0/UDP 62.80.200.53:5061;rport=5061;branch=z9hG4bK59e75a9cf068acf0799d6d7164940e36
Max-Forwards: 16
From: sip:[email protected];tag=e9852fba0cf9dbdbe15b96b702f7de01
To: sip:[email protected];tag=as3fddf795
Call-ID: [email protected]
CSeq: 200 ACK
Expires: 300
User-Agent: Sippy
trixbox
CLI>

— (10 headers 0 lines) —
trixbox*CLI>
<-- SIP read from 62.80.200.53:5060:
BYE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 62.80.200.53;branch=z9hG4bK7d5a.751eca94558a8fbe39e1be734b5c460d.0
Via: SIP/2.0/UDP 62.80.200.53:5061;branch=z9hG4bK2b102549574b42de0580b8c9c57b927e;rport=5061
Max-Forwards: 16
From: sip:[email protected];tag=e9852fba0cf9dbdbe15b96b702f7de01
To: sip:[email protected];tag=as3fddf795
Call-ID: [email protected]
CSeq: 201 BYE
Contact: Anonymous sip:62.80.200.53:5061
Expires: 300
User-Agent: Sippy
cisco-GUID: 4111820133-525472220-3107127311-4157622960
h323-conf-id: 4111820133-525472220-3107127311-4157622960

— (13 headers 0 lines) —
Sending to 62.80.200.53 : 5060 (NAT)
Transmitting (NAT) to 62.80.200.53:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 62.80.200.53;branch=z9hG4bK7d5a.751eca94558a8fbe39e1be734b5c460d.0;received=62.80.200.53
Via: SIP/2.0/UDP 62.80.200.53:5061;branch=z9hG4bK2b102549574b42de0580b8c9c57b927e;rport=5061
From: sip:[email protected];tag=e9852fba0cf9dbdbe15b96b702f7de01
To: sip:[email protected];tag=as3fddf795
Call-ID: [email protected]
CSeq: 201 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:[email protected]
Content-Length: 0


Destroying call ‘[email protected]
[/code:1]
A voice from my voip box says that the number can not be reached.
Please advice.