[Spce-user] Inbound SIP header to end point

Jon Bonilla (Manwe) jbonilla at sipwise.com
Thu Apr 18 18:31:47 EDT 2013


El Thu, 18 Apr 2013 13:11:32 +1000
Martin Wong <martin.wong at binaryelements.com.au> escribió:

> Hi,
> 
> Got a question about the SIP request from the SPCE Proxy box to the end
> user's PBX.
> 
> Currently, this is what I get when Ngrepped.
> 
> 1.1.1.1 = the SPCE box
> 2.2.2.2 = End user's PBX
> 3.3.3.3 = Provider's SIP Trunk
> 
> Caller is from external - 123456789 to Callee 987654321
> 
> U 2013/04/18 12:47:00.816688 1.1.1.1:5060 -> 2.2.2.2:5067
> INVITE sip:mysipuser at 2.2.2.2:5067;rinstance=36f2c8bcb74a5a6e SIP/2.0.
> Max-Forwards: 10.
> Record-Route:
> <sip:1.1.1.1;r2=on;lr=on;ftag=23E576CB-516F5EA4000C73DF-2F80D700;ngcplb=yes>.
> Record-Route:
> <sip:127.0.0.1;r2=on;lr=on;ftag=23E576CB-516F5EA4000C73DF-2F80D700;ngcplb=yes>.
> Via: SIP/2.0/UDP
> 1.1.1.1;branch=z9hG4bK94c4.a1ab1516120881e8339f6245d6465338.0.
> Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bKAZsIBaci;rport=5080.
> From: <sip:123456789 at 3.3.3.3>;tag=23E576CB-516F5EA4000C73DF-2F80D700.
> To: <sip:mysipuser at 1.1.1.1>.
> CSeq: 10 INVITE.
> Call-ID: 5da3-4b2-31820132470-SYYP_IMG01-2-125.213.174.58_b2b-1.
> Allow: INVITE,ACK,CANCEL,BYE,REFER,OPTIONS,NOTIFY,SUBSCRIBE,PRACK,INFO.
> Content-Type: application/sdp.
> Content-Length: 394.
> Contact: <sip:ngcp-lb at 1.1.1.1:5060;ngcpct='sip:127.0.0.1:5080'>.
> 
> My question is
> 
> 1. How do I change the Contact header from ngcp-lb to the callee
> destination - 987654321? The end user PBX needs to route it to the correct
> route.

You won't never route the call based on the contact header. What your PBX would
expect IMHO is the number in the request-uri.

Intead of 

INVITE sip:mysipuser at 2.2.2.2:5067

you would need/like

INVITE sip:987654321 at 2.2.2.2:5067


That's achieved in your subscriber preferences: Enable e164_to_ruri option and
the system will send the E164 number (in the format your rewrite rules
denormalize it) in the request uri

> 
> 2. As you can see in the From: header... it says 123456789 at 3.3.3.3 which
> shows the provider's SIP trunk address ... I know we're proxying it but is
> it possible to hide this perhaps and make it the SPCE ip address instead?

it is possible but you'll need to play with sems' customtt file. Check the
Handbook to get familiar with custom templates. 

In /etc/sems/etc/ngcp.sbcprofile.conf you have this:

To=$H(P-Called-Party-ID)
From=$f

this means that sems will use what the proxy sets in the "P-Called-Party-ID" as
To header.
From header remains untouched. 

Maybe what you would need is to harcode the From header to a value, or you
would need to make it configurable depending on the domain you're using and set
it via a header as the To header. If you just want to hardcode it to a custom
domain like the spce ip address it's easy. Just edit the sbc profile
configuration file and set the from header to something like:

From=$fU at 1.2.3.4

If you need something more configurable you'll need to check/edit it in
kamailio proxy and send it to sems as header. This would be more complicated.


PD: Check the README.sbc form sems' sources: 

http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sems;a=blob;f=doc/Readme.sbc.txt;h=4b03751b5b799d8fd8b942f33028e4f44fb6c752;hb=d259240be4fa8775c534a4728697747ca6a5f633




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130419/45b5aaec/attachment-0001.asc>


More information about the Spce-user mailing list