<div dir="ltr"><div><div>OK I get  it now. There is one more scenario I am confused about. If rtpengine_answer()  is called in case of session progress and 200 OK, In my setup I receive two session progress messages (one from some IVR and another from gateway) and a 200 OK.<br><br></div>I received ports from engine as 1111 for first session progress, 2222 from second  session progress and 2222 for 200 OK. I was hoping to get same port  for both session progress as call-id, from tag and to tag are all same.<br></div>Below is log<br><br>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>Got valid command from <a href="http://127.0.0.1:33547">127.0.0.1:33547</a>: offer - { "sdp": "v=0#015#012o=- 3631009831 3631009831 IN IP4 192.168.1.3#015#012s=pjmedia#015#012t=0 0#015#012a=X-nat:0#015#012m=audio 20006 RTP/AVP 18 96#015#012c=IN IP4 192.168.1.3#015#012a=sendrecv#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 annexb=no#015#012a=rtpmap:96 telephone-event/8000#015#012a=fmtp:96 0-15#015#012", <br>"ICE": "remove", "flags": [ "trust-address" ], "replace": [ "origin", "session-connection" ], "transport-protocol": "RTP/AVP", <br>"call-id": "4e8e93113865474f8ca8e05ff24d7455", "via-branch": "z9hG4bKPjdf770807f3964b44a8d1369df2c4412c", <br>"received-from": [ "IP4", "192.168.0.2" ], "from-tag": "50686ed6b54042b2808b44759f9b6b15", "command": "offer" }<br><br>Jan 23 08:20:44 localhost rtpengine[7748]: [4e8e93113865474f8ca8e05ff24d7455] Creating new call<br>Jan 23 08:20:44 localhost rtpengine[7748]: [4e8e93113865474f8ca8e05ff24d7455] Returning to SIP proxy: d3:sdp257:v=0#015#012o=- 3631009831 3631009831 IN IP4 1.1.1.1#015#012s=pjmedia#015#012t=0 0#015#012a=X-nat:0#015#012m=audio 39424 RTP/AVP 18 96#015#012c=IN IP4 1.1.1.1#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 annexb=no#015#012a=rtpmap:96 telephone-event/8000#015#012a=fmtp:96 0-15#015#012a=sendrecv#015#012a=rtcp:39425#015#0126:result2:oke<br><br>Got valid command from <a href="http://127.0.0.1:52311">127.0.0.1:52311</a>: answer - <br>{ "sdp": "v=0#015#012o=FreeSWITCH 1421976862 1421976863 IN IP4 192.168.112.5#015#012s=FreeSWITCH#015#012c=IN IP4 192.168.112.5#015#012t=0 0#015#012m=audio 24382 RTP/AVP 18 96#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 annexb=no#015#012a=rtpmap:96 telephone-event/8000#015#012a=fmtp:96 0-16#015#012a=ptime:20#015#012a=rtcp:24383 IN IP4 192.168.112.5#015#012", <br>"ICE": "remove", "flags": [ "asymmetric", "trust-address" ], "replace": [ "origin", "session-connection" ], "transport-protocol": "RTP/AVP", <br>"call-id": "4e8e93113865474f8ca8e05ff24d7455", "via-branch": "z9hG4bKb116.3816ce54.0", <br>"received-from": [ "IP4", "192.168.112.5" ], "from-tag": "50686ed6b54042b2808b44759f9b6b15", "to-tag": "Sy1g30te66FFc", "command": "answer" }<br><br>Returning to SIP proxy: d3:sdp270:v=0#015#012o=FreeSWITCH 1421976862 1421976863 IN IP4 1.1.1.1#015#012s=FreeSWITCH#015#012c=IN IP4 1.1.1.1#015#012t=0 0#015#012<br>m=audio 39432 RTP/AVP 18 96#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 annexb=no#015#012a=rtpmap:96 telephone-event/8000#015#012a=fmtp:96 0-16#015#012a=ptime:20#015#012a=sendrecv#015#012a=rtcp:39433#015#0126:result2:oke<br><br><br>Jan 23 08:20:48 localhost rtpengine[7748]: [4e8e93113865474f8ca8e05ff24d7455 port 39432] Confirmed peer address as <a href="http://103.242.60.183:20006">103.242.60.183:20006</a><br>Jan 23 08:20:48 localhost rtpengine[7748]: [4e8e93113865474f8ca8e05ff24d7455 port 39432] No support for kernel packet forwarding available<br>Jan 23 08:20:48 localhost rtpengine[7748]: [4e8e93113865474f8ca8e05ff24d7455 port 39424] No support for kernel packet forwarding available<br><br>Got valid command from <a href="http://127.0.0.1:40973">127.0.0.1:40973</a>: answer - { "sdp": "v=0#015#012o=Gateway_UAC 1052726242 253619918 IN IP4 61.236.47.17#015#012s=SIP Media Capabilities#015#012c=IN IP4 61.246.46.83#015#012t=0 0#015#012m=audio 39700 RTP/AVP 18#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 annexb=no#015#012a=maxptime:20#015#012", <br>"ICE": "remove", "flags": [ "asymmetric", "trust-address" ], "replace": [ "origin", "session-connection" ], "transport-protocol": "RTP/AVP", <br>"call-id": "4e8e93113865474f8ca8e05ff24d7455", "via-branch": "z9hG4bKb116.3816ce54.0", <br>"received-from": [ "IP4", "192.168.112.5" ], "from-tag": "50686ed6b54042b2808b44759f9b6b15", "to-tag": "Sy1g30te66FFc", "command": "answer" }<br><br><br>Returning to SIP proxy: d3:sdp230:v=0#015#012o=Gateway_UAC 1052726242 253619918 IN IP4 1.1.1.1#015#012s=SIP Media Capabilities#015#012<br>c=IN IP4 1.1.1.1#015#012t=0 0#015#012<br>m=audio 39440 RTP/AVP 18#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 annexb=no#015#012a=maxptime:20#015#012a=sendrecv#015#012a=rtcp:39441#015#0126:result2:oke<br>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><div><br><br><br><br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 7:47 PM, Richard Fuchs <span dir="ltr"><<a href="mailto:rfuchs@sipwise.com" target="_blank">rfuchs@sipwise.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 01/21/15 09:13, John Nash wrote:<br>
> Yes I can see that even if call-id is same but to tag is different<br>
> rtpengine allocating new port But my issue is end UA receives two<br>
> different ports in two session progress message (One for each forked<br>
> destination). My complete flow is...<br>
> UA Sends Invite to openser<br>
> Openser does rtpengine_offer and forwards to Media Server (IVR) (Port<br>
> 1111 as example sent to Media Server)<br>
> Media Server sends Session Progress to openser and openser does<br>
> rtpengine_answer<br>
> Openser sends Session Progress back to UA (Port 2222)<br>
> At openser media servers sends failure message (After IVR is played) and<br>
> openser sends Invite again to Other destination a gateway (Port 1111sent<br>
> again to gateway too!!)<br>
> When gateway sends session progress and openser does rtpengine_answer<br>
> again it allocates a different port !! 3333 and finally UA receives<br>
> another port in second session progess.<br>
><br>
> I understand that To tag is different in second session progress from<br>
> gateway but something seems to be wrong.<br>
><br>
> Expected behavior is UA should always receive single port (In both<br>
> session progress) and two Invites (Each to different destinations should<br>
> have different port) isnt it?<br>
<br>
</span>Not at all. Remove rtpengine from the scenario and think about who gets<br>
to see which ports. Both invites would contain the same port, but the<br>
replies would contain different ports (in fact different addresses). So<br>
the result is exactly the same.<br>
<div class="HOEnZb"><div class="h5"><br>
cheers<br>
_______________________________________________<br>
Spce-user mailing list<br>
<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br>
<a href="https://lists.sipwise.com/listinfo/spce-user" target="_blank">https://lists.sipwise.com/listinfo/spce-user</a><br>
</div></div></blockquote></div><br></div>