Hello,
it looks like you do not o record_route() for INVITE. The Path
extensions is only for REGISTER request and used only for the initial
INVITE of a dialog. To properly route the requests within dialog you
have to use record_route() and loose_route() in your config -- see the
default kamailio.cfg for an example.
Cheers,
Daniel
On 11.04.17 17:36, gerry kernan wrote:
Hi
Thanks in advanced if anyone can help me on this.
I have kamailio -4.2.3-1.1 running in front of asterisk 13.13.1. I’m
using Path support with asterisk so that I can forward Sip requests
via kamailio to the asterisk server running on a LAN IP. Kamailio is
configured with a WAN and LAN IP.
All works well I can register a sip endpoint to the asterisk server
via kamailio and make an receive calls, SIP OPTIONs from the asterisk
server are received and relayed by kamailio to endpoints. But I’m
having issues when a call is hung up asterisk appears to be trying to
send the BYE via its own IP address rather that the IP of the LAN
interface on the kamailio server.
Should I be looking at the issue being on asterisk as it is not
sending the BYE via correct IP?
Y.Y.Y.Y = WAN IP of client endpoint
192.10.10.216 = LAN IP of asterisk
Example of BYE from sip debug on asterisk
--- (10 headers 0 lines) ---
Really destroying SIP dialog
'5d3ae6944a08b42c2078e237141e0e40@192.10.10.216:5060' Method: OPTIONS
-- <SIP/1001-00000011> Playing 'digits/17.ulaw' (language
'en')
-- Executing [*250@cos-all:8] Wait("SIP/1001-00000011", "1") in
new stack
-- Executing [*250@cos-all:9] SayUnixTime("SIP/1001-00000011",
",,IMp") in new stack
-- <SIP/1001-00000011> Playing 'digits/4.ulaw' (language 'en')
-- <SIP/1001-00000011> Playing 'digits/oh.ulaw' (language
'en')
-- <SIP/1001-00000011> Playing 'digits/4.ulaw' (language 'en')
-- <SIP/1001-00000011> Playing 'digits/p-m.ulaw' (language
'en')
-- *Executing [*250@cos-all:10] Hangup("SIP/1001-00000011", "")
in
new stack*
== Spawn extension (cos-all, *250, 10) exited non-zero on
'SIP/1001-00000011'
Scheduling destruction of SIP dialog
'OGRjYzJlYmE5MDhjYTdkMTM1ZTAxNTk2YWYwNDg5MTA.' in 6400 ms (Method: ACK)
set_destination: Parsing <sip:1001@Y.Y.Y.Y:16078;transport=UDP> for
address/port to send to
set_destination: set destination to Y.Y.Y.Y:16078
Reliably Transmitting (no NAT) to Y.Y.Y.Y:16078:
BYE sip:1001@Y.Y.Y.Y:16078;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.10.10.216:5060;branch=z9hG4bK46ed8549
Max-Forwards: 70
From: <sip:*250@sip.domain.ie;transport=UDP>;tag=as60c5965b
To: <sip:1001@sip.domain.ie;transport=UDP>;tag=471c3a31
Call-ID: OGRjYzJlYmE5MDhjYTdkMTM1ZTAxNTk2YWYwNDg5MTA.
CSeq: 102 BYE
User-Agent: OMBUTEL PBX
Proxy-Authorization: Digest username="1001", realm="asterisk",
algorithm=MD5, uri="sip:sip.domain.ie", nonce="4aaa41f3",
response="136fac72a799f9507a7466b578786110"
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
KAMAILIO LAN IP = 192.10.10.202
SIP status of peer on asterisk
* Name : 1001
Description : Infinity-Test
Secret : <Set>
MD5Secret : <Not set>
Remote Secret: <Not set>
Context : cos-all
Record On feature : automon
Record Off feature : automon
Subscr.Cont. : <Not set>
Language : en
Tonezone : uk
AMA flags : Unknown
Transfer mode: open
CallingPres : Presentation Allowed, Not Screened
Callgroup :
Pickupgroup :
Named Callgr :
Nam. Pickupgr:
MOH Suggest : ringback
Mailbox : 1001@ombutel-voicemail
VM Extension : asterisk
LastMsgsSent : 0/0
Call limit : 2147483647
Max forwards : 0
Dynamic : Yes
Callerid : "Infinity-Test" <1001>
MaxCallBR : 384 kbps
Expire : 3228
Insecure : no
Force rport : No
Symmetric RTP: No
ACL : Yes
DirectMedACL : No
T.38 support : No
T.38 EC mode : Unknown
T.38 MaxDtgrm: 4294967295
DirectMedia : Yes
PromiscRedir : No
User=Phone : No
Video Support: No
Text Support : No
Ign SDP ver : No
Trust RPID : Yes
Send RPID : Yes
Path support : Yes
*Path : <sip:192.10.10.202;lr;received=sip:Y.Y.Y.Y:16078>*
TrustIDOutbnd: Legacy
Subscriptions: Yes
Overlap dial : Yes
DTMFmode : rfc2833
Timer T1 : 500
Timer B : 32000
ToHost :
Addr->IP : 192.168.200.122:5060
Defaddr->IP : (null)
Prim.Transp. : UDP
Allowed.Trsp : UDP
Def. Username: 1001
SIP Options : norefersub replaces replace timer
Codecs : (ulaw|alaw|g729)
Auto-Framing : No
Status : OK (19 ms)
Useragent : Zoiper for Windows 2.43 r24984
Reg. Contact :
sip:1001@192.168.200.122:5060;rinstance=3798b50d10d60d84;transport=UDP
Qualify Freq : 60000 ms
Keepalive : 0 ms
Sess-Timers : Accept
Sess-Refresh : uas
Sess-Expires : 1800 secs
Min-Sess : 90 secs
RTP Engine : asterisk
Parkinglot :
Use Reason : No
*Gerry Kernan*
cid:image001.jpg@01D105A5.2701B0E0
*Infinity IT | 17 The Mall | Beacon Court | Sandyford
| Dublin D18 E3C8 | Ireland*
*Tel: +353 - (0)1 - 293 0090 | E-Mail:
*gerry.kernan(a)infinityit.ie <mailto:gerry.kernan@infinityit.ie>**
* *
*Managed IT Services_ _Infinity IT*-
www.infinityit.ie
<http://www.infinityit.ie/>
*IP Telephony_ _Asterisk Consulting*–
www.asteriskconsulting.com <http://www.asteriskconsulting.com>
*Contact Centre_ _Total Interact*–
www.totalinteract.com <http://www.totalinteract.com>
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) -
www.asipto.com
Kamailio World Conference - May 8-10, 2017 -
www.kamailioworld.com