[SR-Users] Trouble with max-forwards

Daniel-Constantin Mierla miconda at gmail.com
Wed Oct 29 16:41:25 CET 2014


Hello,

most probably Max-Forward matches this:

remove_hf_re("X-.*");

Iirc, the regexp is case insensitive. You should use:

remove_hf_re("^X-.*");

In this way you are sure you don't match any "X-" inside header name.

Cheers,
Daniel

On 29/10/14 16:29, Mike Dunton wrote:
> Readers,
>
> I am having issues with passing the max-forward header to my
> freeswitch service.
>
> Here are the sip invites 
>
> Here is a call coming from a kazoo box though my carrier Into
> kamailio. Kamailio shows it has Max-Forward after the sanitize check,
> but when it reaches freeswitch no Max-Forward Header.
>
> *KAMAILIO*
>
> kamailio[2687]: ERROR: <script>: After Sanitize -
> [INVITE sip:+1850764####@aio07-bandwidth.tresta-aio.com:5060
> <http://sip:+18507646071@aio07-bandwidth.tresta-aio.com:5060/> SIP/2.0
> Record-Route: <sip:67.231.8.###;lr=on;ftag=gK043cdaa8>
> Record-Route: <sip:67.231.8.###;lr=on;ftag=gK043cdaa8>
> Accept: application/sdp
> Allow: INVITE,ACK,CANCEL,BYE
> Via: SIP/2.0/UDP 67.231.8.###;branch=z9hG4bKc892.2791522.0
> Via: SIP/2.0/UDP 67.231.8.###;branch=z9hG4bKc892.f8621604.0
> Via: SIP/2.0/UDP 67.231.9.###:5060;branch=z9hG4bK04B40f39b0e10295cd4
> From:  <sip:+1NUMBERSCRUBED at 67.231.9.59
> <mailto:sip%3A%2B1NUMBERSCRUBED at 67.231.9.59>;isup-oli=0>;tag=gK043cdaa8
> To: <sip:+1850764####@67.231.8.85
> <mailto:sip%3A%2B18507646071 at 67.231.8.85>>
> Call-ID: 537168748_70701748 at 67.231.9.#
> <mailto:537168748_70701748 at 67.231.9.59>##
> CSeq: 1289511105 INVITE
> *Max-Forwards: 49*
> Contact: "1NUMBERSCRUBED" <sip:+1NUMBERSCRUBED at 67.231.9.###:5060
> <http://sip:+1NUMBERSCRUBED@67.231.9.59:5060/>>
> Allow-Events: talk, hold, conference, presence, as-feature-event,
> dialog, line-seize, call-info, sla, include-session-description,
> presence.winfo, message-summary, refer
> X-FS-Support: update_display,send_info
> Supported: precondition
> Content-Length:   359
> Content-Type: application/sdp
> Remote-Party-ID:  <sip:+1NUMBERSCRUBED at 67.231.9.###:5060
> <http://sip:+1NUMBERSCRUBED@67.231.9.59:5060/>>;privacy=off;screen=no
>
> v=0
> o=Sonus_UAC 1180063305 112694125 IN IP4 67.231.9.59
> s=SIP Media Capabilities
> c=IN IP4 67.231.9.72
> t=0 0
> m=audio 23918 RTP/AVP 9 0 18 96 101
> a=rtpmap:9 G722/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:96 iLBC/8000
> a=fmtp:96 mode=30
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=sendrecv
> a=maxptime:30
>
> *FREESWITCH
>
> *
> recv 1479 bytes from udp/[10.1.13.123]:5060 at 18:31:26.312854:
>  
>  ------------------------------------------------------------------------
>    INVITE sip:+1850764###@aio07-bandwidth.tresta-aio.com:5060
> <http://sip:+18507646071@aio07-bandwidth.tresta-aio.com:5060/> SIP/2.0
>    Record-Route: <sip:10.1.13.###;lr=on;ftag=gK043cdaa8>
>    Record-Route: <sip:67.231.8.###;lr=on;ftag=gK043cdaa8>
>    Record-Route: <sip:67.231.8.###;lr=on;ftag=gK043cdaa8>
>    Accept: application/sdp
>    Allow: INVITE,ACK,CANCEL,BYE
>    Via: SIP/2.0/UDP 10.1.13.123;branch=z9hG4bKc892.1b308e66.0
>    Via: SIP/2.0/UDP 67.231.8.195;branch=z9hG4bKc892.2791522.0
>    Via: SIP/2.0/UDP 67.231.8.85;branch=z9hG4bKc892.f8621604.0
>    Via: SIP/2.0/UDP 67.231.9.59:5060;branch=z9hG4bK04B40f39b0e10295cd4
>    From:  <sip:+1NUMBERSCRUBED at 67.231.9.#
> <mailto:sip%3A%2B1NUMBERSCRUBED at 67.231.9.59>##;isup-oli=0>;tag=gK043cdaa8
>    To: <sip:+1850764####@67.231.8.#
> <mailto:sip%3A%2B18507646071 at 67.231.8.85>##>
>    Call-ID: 537168748_70701748 at 67.231.9.#
> <mailto:537168748_70701748 at 67.231.9.59>##
>    CSeq: 1289511105 INVITE
>    MaxForwards would go here?
>    Contact: "1NUMBERSCRUBED" <sip:+1NUMBERSCRUBED at 67.231.9.###:5060
> <http://sip:+1NUMBERSCRUBED@67.231.9.59:5060/>>
>    Allow-Events: talk, hold, conference, presence, as-feature-event,
> dialog, line-seize, call-info, sla, include-session-description,
> presence.winfo, message-summary, refer
>    Supported: precondition
>    Content-Length:   359
>    Content-Type: application/sdp
>    Remote-Party-ID:  <sip:+1NUMBERSCRUBED at 67.231.9.###:5060
> <http://sip:+1NUMBERSCRUBED@67.231.9.59:5060/>>;privacy=off;screen=no
>    X-AUTH-IP: 67.231.8.195
>
>    v=0
>    o=Sonus_UAC 1180063305 112694125 IN IP4 67.231.9.59
>    s=SIP Media Capabilities
>    c=IN IP4 67.231.9.72
>    t=0 0
>    m=audio 23918 RTP/AVP 9 0 18 96 101
>    a=rtpmap:9 G722/8000
>    a=rtpmap:0 PCMU/8000
>    a=rtpmap:18 G729/8000
>    a=fmtp:18 annexb=no
>    a=rtpmap:96 iLBC/8000
>    a=fmtp:96 mode=30
>    a=rtpmap:101 telephone-event/8000
>    a=fmtp:101 0-15
>    a=sendrecv
>    a=maxptime:30
>
> Here is my kamailio default.cfg http://pastebin.com/vxdFe8n0
>
> Can anyone point me in the right direction, and tell me why freeswitch
> isn't being passed this header? Both kamailio and freeswitch are on
> the same box in this example.
>
> Thanks for your help.
> Mike
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20141029/59255bd3/attachment.html>


More information about the sr-users mailing list