I was making a IVR that transfer calls based on their DTMF keys the transfer went smoothly but when the call is transfered the caller ID from other side is the the calle number(the IVR number) but if i set the CallerID(num) as the customer number like incoming number is 0997855XXXX then it return as 404 then the call dropped without any trace the logs says unallocated Unsigned Number.
<--- SIP read from UDP:192.168.130.20:5060 --->
INVITE sip:2399200@172.250.230.160 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK6e6b749a
Max-Forwards: 70
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as5ed5e793
To: <sip:2399200@172.250.230.160>
Contact: <sip:09978551579@192.168.130.20:5060>
Call-ID: 1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060
CSeq: 102 INVITE
User-Agent: CAIP SIP 2.0
Date: Mon, 18 Nov 2024 16:15:23 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 272
v=0
o=root 1746131960 1746131960 IN IP4 192.168.130.20
s=CAIP SIP 2.0
c=IN IP4 192.168.130.20
t=0 0
m=audio 15226 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=ptime:20
a=maxptime:150
a=sendrecv
<------------->
--- (14 headers 13 lines) ---
Sending to 192.168.130.20:5060 (no NAT)
Sending to 192.168.130.20:5060 (no NAT)
Using INVITE request as basis request - 1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060
Found peer 'UPG' for '09978551579' from 192.168.130.20:5060
== Using SIP RTP CoS mark 5
Got SDP version 1746131960 and unique parts [root 1746131960 IN IP4 192.168.130.20]
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw|gsm), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
> 0x778254045960 -- Strict RTP learning after remote address set to: 192.168.130.20:15226
Peer audio RTP is at port 192.168.130.20:15226
Looking for 2399200 in main-inbound (domain 172.250.230.160)
sip_route_dump: route/path hop: <sip:09978551579@192.168.130.20:5060>
<--- Transmitting (NAT) to 192.168.130.20:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK6e6b749a;received=192.168.130.20;rport=5060
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as5ed5e793
To: <sip:2399200@172.250.230.160>
Call-ID: 1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060
CSeq: 102 INVITE
Server: Asterisk PBX GIT-18-fe4394ebfe
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Contact: <sip:2399200@172.250.230.160:5060>
Content-Length: 0
<------------>
-- Executing [2399200@main-inbound:1] Answer("SIP/UPG-00000038", "") in new stack
Audio is at 14494
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (NAT) to 192.168.130.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK6e6b749a;received=192.168.130.20;rport=5060
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as5ed5e793
To: <sip:2399200@172.250.230.160>;tag=as53b3432f
Call-ID: 1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060
CSeq: 102 INVITE
Server: Asterisk PBX GIT-18-fe4394ebfe
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Contact: <sip:2399200@172.250.230.160:5060>
Content-Type: application/sdp
Content-Length: 280
v=0
o=root 1361308927 1361308927 IN IP4 172.250.230.160
s=Asterisk PBX GIT-18-fe4394ebfe
c=IN IP4 172.250.230.160
t=0 0
m=audio 14494 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=maxptime:140
a=sendrecv
<------------>
<--- SIP read from UDP:192.168.130.20:5060 --->
ACK sip:2399200@172.250.230.160:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK74948aed
Max-Forwards: 70
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as5ed5e793
To: <sip:2399200@172.250.230.160>;tag=as53b3432f
Contact: <sip:09978551579@192.168.130.20:5060>
Call-ID: 1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060
CSeq: 102 ACK
User-Agent: CAIP SIP 2.0
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
> 0x778254045960 -- Strict RTP switching to RTP target address 192.168.130.20:15226 as source
-- Executing [2399200@main-inbound:2] Set("SIP/UPG-00000038", "CALLERID(num)=09978551579") in new stack
-- Executing [2399200@main-inbound:3] BackGround("SIP/UPG-00000038", "bo_ivr") in new stack
-- <SIP/UPG-00000038> Playing 'bo_ivr.slin' (language 'en')
-- Executing [1@main-inbound:1] NoOp("SIP/UPG-00000038", "Caller pressed 1 - Transfer to 09456880410") in new stack
-- Executing [1@main-inbound:2] Dial("SIP/UPG-00000038", "SIP/09957008712@192.168.130.20,30") in new stack
== Using SIP RTP CoS mark 5
Audio is at 15010
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.130.20:5060:
INVITE sip:09957008712@192.168.130.20 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5060;branch=z9hG4bK269d5c4f
Max-Forwards: 70
From: "09978551579" <sip:09978551579@172.250.230.160>;tag=as43c2d886
To: <sip:09957008712@192.168.130.20>
Contact: <sip:09978551579@172.250.230.160:5060>
Call-ID: 1441766f1765f559680a594c76d11d64@172.250.230.160:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX GIT-18-fe4394ebfe
Date: Mon, 18 Nov 2024 16:36:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Type: application/sdp
Content-Length: 303
v=0
o=root 2051045946 2051045946 IN IP4 172.250.230.160
s=Asterisk PBX GIT-18-fe4394ebfe
c=IN IP4 172.250.230.160
t=0 0
m=audio 15010 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:140
a=sendrecv
---
-- Called SIP/09957008712@192.168.130.20
<--- SIP read from UDP:192.168.130.20:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.250.230.160:5060;branch=z9hG4bK269d5c4f;received=172.250.230.160;rport=5060
From: "09978551579" <sip:09978551579@172.250.230.160>;tag=as43c2d886
To: <sip:09957008712@192.168.130.20>
Call-ID: 1441766f1765f559680a594c76d11d64@172.250.230.160:5060
CSeq: 102 INVITE
Server: CAIP SIP 2.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:09957008712@192.168.130.20:5060>
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
<--- SIP read from UDP:192.168.130.20:5060 --->
OPTIONS sip:172.250.230.160 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK2992b69b;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.130.20>;tag=as3e135a66
To: <sip:172.250.230.160>
Contact: <sip:asterisk@192.168.130.20:5060>
Call-ID: 34b13d70662aa17350d01c822fcef7c6@192.168.130.20:5060
CSeq: 102 OPTIONS
User-Agent: CAIP SIP 2.0
Date: Mon, 18 Nov 2024 16:15:27 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Sending to 192.168.130.20:5060 (no NAT)
Looking for s in default (domain 172.250.230.160)
<--- Transmitting (no NAT) to 192.168.130.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK2992b69b;received=192.168.130.20;rport=5060
From: "asterisk" <sip:asterisk@192.168.130.20>;tag=as3e135a66
To: <sip:172.250.230.160>;tag=as09b74d2a
Call-ID: 34b13d70662aa17350d01c822fcef7c6@192.168.130.20:5060
CSeq: 102 OPTIONS
Server: Asterisk PBX GIT-18-fe4394ebfe
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Contact: <sip:172.250.230.160:5060>
Accept: application/sdp
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '34b13d70662aa17350d01c822fcef7c6@192.168.130.20:5060' in 32000 ms (Method: OPTIONS)
<--- SIP read from UDP:192.168.130.20:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 172.250.230.160:5060;branch=z9hG4bK269d5c4f;received=172.250.230.160;rport=5060
From: "09978551579" <sip:09978551579@172.250.230.160>;tag=as43c2d886
To: <sip:09957008712@192.168.130.20>;tag=as0911b405
Call-ID: 1441766f1765f559680a594c76d11d64@172.250.230.160:5060
CSeq: 102 INVITE
Server: CAIP SIP 2.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
Transmitting (no NAT) to 192.168.130.20:5060:
ACK sip:09957008712@192.168.130.20 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5060;branch=z9hG4bK269d5c4f
Max-Forwards: 70
From: "09978551579" <sip:09978551579@172.250.230.160>;tag=as43c2d886
To: <sip:09957008712@192.168.130.20>;tag=as0911b405
Contact: <sip:09978551579@172.250.230.160:5060>
Call-ID: 1441766f1765f559680a594c76d11d64@172.250.230.160:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX GIT-18-fe4394ebfe
Content-Length: 0
---
Scheduling destruction of SIP dialog '1441766f1765f559680a594c76d11d64@172.250.230.160:5060' in 32000 ms (Method: INVITE)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [1@main-inbound:3] Hangup("SIP/UPG-00000038", "") in new stack
== Spawn extension (main-inbound, 1, 3) exited non-zero on 'SIP/UPG-00000038'
Scheduling destruction of SIP dialog '1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060' in 6400 ms (Method: ACK)
Reliably Transmitting (NAT) to 192.168.130.20:5060:
BYE sip:09978551579@192.168.130.20:5060 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5060;branch=z9hG4bK30017219;rport
Max-Forwards: 70
From: <sip:2399200@172.250.230.160>;tag=as53b3432f
To: "09978551579" <sip:09978551579@192.168.130.20>;tag=as5ed5e793
Call-ID: 1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060
CSeq: 102 BYE
User-Agent: Asterisk PBX GIT-18-fe4394ebfe
X-Asterisk-HangupCause: Unallocated (unassigned) number
X-Asterisk-HangupCauseCode: 1
Content-Length: 0
---
<--- SIP read from UDP:192.168.130.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.250.230.160:5060;branch=z9hG4bK30017219;received=172.250.230.160;rport=5060
From: <sip:2399200@172.250.230.160>;tag=as53b3432f
To: "09978551579" <sip:09978551579@192.168.130.20>;tag=as5ed5e793
Call-ID: 1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060
CSeq: 102 BYE
Server: CAIP SIP 2.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
SIP Response message for INCOMING dialog BYE arrived
Really destroying SIP dialog '1a23780b2f368dd54bcd4dd55a55c053@192.168.130.20:5060' Method: ACK
Reliably Transmitting (NAT) to 192.168.130.20:5060:
OPTIONS sip:192.168.130.20 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5060;branch=z9hG4bK65dd62fe;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@172.250.230.160>;tag=as088f0115
To: <sip:192.168.130.20>
Contact: <sip:asterisk@172.250.230.160:5060>
Call-ID: 3ced321255fe927f1b19e26d653688b1@172.250.230.160:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX GIT-18-fe4394ebfe
Date: Mon, 18 Nov 2024 16:36:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0
---
Reliably Transmitting (NAT) to 192.168.130.20:5060:
OPTIONS sip:192.168.130.20 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5060;branch=z9hG4bK0530bc7a;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@172.250.230.160>;tag=as26518d9b
To: <sip:192.168.130.20>
Contact: <sip:asterisk@172.250.230.160:5060>
Call-ID: 1d43406c09551a9979a4076170e13a16@172.250.230.160:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX GIT-18-fe4394ebfe
Date: Mon, 18 Nov 2024 16:36:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0
here is my dialplan
[main-inbound]
exten => 2399200,1,Answer()
same => n,Set(CALLERID(num)=${CALLERID(num)})
same => n,Background(bo_ivr)
same => n,WaitExten(10)
exten => 1,1,NoOp(Caller pressed 1 - Transfer to 09456880410)
same => n,Dial(SIP/09957008712@192.168.130.20,30)
same => n,Hangup()
exten => 2,1,NoOp(Caller pressed 2 - Transfer to 09456880380)
same => n,Dial(SIP/09456880380@192.168.130.20,30)
same => n,Hangup()
exten => 3,1,NoOp(Caller pressed 3 - Transfer to 09456880370)
same => n,Dial(SIP/09456880370@192.168.130.20,30)
same => n,Hangup()
exten => 0,1,NoOp(Caller pressed 0 - Replay IVR)
same => n,Goto(main-inbound,2399200,2)
exten => i,1,NoOp(Invalid input - Replay IVR)
same => n,Background(bo_ivr)
same => n,WaitExten(10)
exten => t,1,NoOp(Timeout - Replay IVR)
same => n,Background(bo_ivr)
same => n,WaitExten(10)
sip.conf
[UPG]
type = peer
canreinvite = no
disallow = all
dtmfmode = rfc2833
nat = force_rport,comedia
qualify = yes
context = main-inbound
allow = ulaw,alaw,gsm
transport = udp
host = 192.168.xxx.xx