[SR-Users] Add SDP Body
Daniel-Constantin Mierla
miconda at gmail.com
Thu Jul 27 13:35:21 CEST 2017
Hello,
there is a dedicated function to set the body, do not use append_hf(),
because kamailio doesn't detect there is a change of the body and
content length is 0.
Cheers,
Daniel
On 27.07.17 13:25, Nicolas Breuer wrote:
>
> Hello Daniel,
>
>
>
> I added this
>
>
>
> if (status=~"[1][8][0-3]"){
>
> setflag(22);
>
> if (is_method("INVITE")) {
>
> xlog("L_NOTICE", " No SDP");
>
> append_hf("Content-Type: application/sdp\r\n");
>
> append_hf("\r\n");
>
> append_hf("v=0\r\n");
>
> append_hf("o=XX 10 10 IN IP4 217.112.180.9\r\n");
>
> append_hf("s=XX \r\n");
>
> append_hf("c=IN IP4 217.121.180.9\r\n");
>
> append_hf("t=0 0\r\n");
>
> append_hf("m=audio 0 RTP/AVP 8 101\r\n");
>
> append_hf("a=rtpmap:8 PCMA/8000\r\n");
>
> append_hf("a=rtpmap:101 telephone-event/8000\r\n");
>
> append_hf("a=fmtp:101 0-15\r\n");
>
> append_hf("a=sendrecv\r\n");
>
> append_hf("a=ptime:20\r\n");
>
> msg_apply_changes();
>
>
>
> rtpproxy_manage("corbf");
>
>
>
> #rtpproxy_stream2uac("/root/wait.wav", "-1");
>
>
>
> }
>
>
>
>
>
> Seems that proxy was not engaged. -> The port is not altered..
>
> Trace :
>
>
>
> Allow:
> INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH.
>
> Content-Length: 0.
>
> Content-Type: application/sdp.
>
> Server: Belcenter SIP Voice Gateway.
>
> .
>
> v=0.
>
> o=XX 10 10 IN IP4 217.112.180.9.
>
> s=XX .
>
> c=IN IP4 217.121.180.9.
>
> t=0 0.
>
> m=audio 0 RTP/AVP 8 101.
>
> a=rtpmap:8 PCMA/8000.
>
> a=rtpmap:101 telephone-event/8000.
>
> a=fmtp:101 0-15.
>
> a=sendrecv.
>
> a=ptime:20.
>
> .
>
>
>
>
>
>
>
> *De :*Daniel-Constantin Mierla [mailto:miconda at gmail.com]
> *Envoyé :* jeudi 27 juillet 2017 11:41
> *À :* Kamailio (SER) - Users Mailing List
> <sr-users at lists.kamailio.org>; Nicolas Breuer
> <Nicolas.Breuer at belcenter.biz>
> *Objet :* Re: [SR-Users] Add SDP Body
>
>
>
> Hello,
>
>
>
> On 27.07.17 09:57, Nicolas Breuer wrote:
>
> Hello,
>
>
>
> I’m trying to add a SDP Body on 183 replies.
>
>
>
> From some carriers I don’t get any SDP.
>
> The goal is to add SDP , Engage PROXY & stream2uac on all 183
> packets without SDP
>
>
>
> Do you think it’s possible ? J
>
>
>
> it may be possible, if you try to combine adding content-type header
> and the sdp body, then use msg_apply_changes() inside reply_route{}.
> Later engage the rtpproxy. However, if you don't know the codecs of
> caller/callee, it may end in a mismatch.
>
> Just dropping such 183 is not ok? If not, what about turning 183 in an
> 180? Or setting an SDP with media IP 0.0.0.0 (old on hold style)?
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
> Kamailio Advanced Training - www.asipto.com <http://www.asipto.com>
> Kamailio World Conference - www.kamailioworld.com <http://www.kamailioworld.com>
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170727/04f3c5e3/attachment.html>
More information about the sr-users
mailing list