Custom SIP Notify via proxy
Hello, Sent this post a couple of weeks back. Still trying to find a solution, so trying again and see if anyone has any thoughts! I am trying to send CUSTOM NOTIFY events to devices, using the ESL interface with a PHP script of the following form. I am having partial success, but coming up against problems when using with an outbound SIP proxy:- $e = new ESLevent("NOTIFY"); $e->addHeader("profile", "internal"); $e->addHeader("from", "1020"); $e->addHeader("to-uri", "sip:1019@192.168.2.3:5063;fs_path=sip:82.24.214.226:5063"); $e->addHeader("from-uri", "sip:1020@pbx.rm.com"); $e->addHeader("host", "pbx.rm.com"); $e->addHeader("event-string", "check-sync"); $e->addHeader("content-type", "application/simple-message-summary"); $e->addBody("ok"); $res = $sockFSServerCommand->sendEvent($e); In our setup, we have several FreeSwitch boxes sitting behind two OpenSIPS load balancers. These Load Balancers handle registrations, etc. When we originate calls from FreeSwitch, we use an originate URL of the form (sofia/internal/1001@sip.redmatter.com;fs_path=sip:84.45.30.2<mailto:sofia/internal/1001@sip.redmatter.com;fs_path=sip:84.45.30.2>), and use fs_path to push the sip call out via the right load balancer/ proxy. This works perfectly. So, with the custom NOTIFY's I also need to make them follow the same path. As mentioned, we already have the contact string in our hand from the OpenSIPS registration server, but can't see how I can use that plus force the outbound path for the Notify. Was thinking I could use fs_path in the uri (as above) but doesn't seem to work, i.e. the wrong IP is used, and NOTIFY is messed up somewhat (see example below)! Maybe another combination I am missing! ------------------------ NOTIFY sip:1019@192.168.2.3:5063;fs_path=sip:82.24.214.22:5063 SIP/2.0 Via: SIP/2.0/UDP 212.85.24.245;rport;branch=z9hG4bKv268QHcy539yc Max-Forwards: 70 From: <sip:1020@pbx.rm.com>;tag=0rer8BS2etmmc To: <sip:1019@192.168.2.3:5063>;fs_path=sip:82.24.214.22:5063 Call-ID: 5a08d5c6-1a8e-122e-3885-0024e86c401a CSeq: 134921 NOTIFY Contact: <sip:mod_sofia@212.85.24.245:5060> User-Agent: FreeSWITCH-mod_sofia/1.0.5-20100211-0400-16602 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE Supported: precondition, path, replaces Event: check-sync Allow-Events: talk, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer Subscription-State: terminated;reason=timeout Content-Type: application/simple-message-summary Content-Length: 2 ok ------------------ Any thoughts gratefully appreciated. Rgds, Neil
participants (1)
-
Neil Burgess