<div dir="ltr">I did some more testing with this yesterday. The phone that is redirecting
indeed is behind nat, but my pstn gateway is all open net. What I did
find was that opensips was rediricting sdp to the phone still and not
the gateway. Why there is still rtp traffic in asterisk is still a
mystery, but I think with the right code I can also redirect the sdp
out to the pstn as well.<br>
<br>
Will update you all on how this goes as I don't anticipate to start this scripting challenge till late in the week.<br>
<br>
A question that comes up is does the get_redirect function actually
work in the failure route or am I misplacing it and it should be
somewhere else?<br>
<br>
Thanks,<br>
<br>
Alex<br><br><div class="gmail_quote">On Tue, Aug 19, 2008 at 6:30 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Alex,<br>
<br>
Glad you solved the problem - at least at signalling level :)<br>
<br>
Do you have NAT involved ? Have you checked the SDP (Ip and port) in both request and reply to see if where the problem comes?<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Alex G wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
well i did make some headway on this, unfortunately i had to get tricky with it.<br>
<br>
Even with the get redirects, it was still not placing the correct redirect in there. As a matter of fact, it seems like the function was not working at all in the failure_route. My solution involved setting an avp in the reply route becuase both the source and destination of the paceket were the same when it was in the failure route. So in on reply i set an avp that then if was true in the branch route just rewrote the host port. So great I was able to make the call path divert but when the 2 pstn endpoints actually link, there is no sound. There seems to be rtp when i look in asterisk's cli, but neither side is giving me audio :(<br>
<br>
In the branch route, i tried with and without forecrtp proxy, but no dice....<br>
<br>
anyone have an idea as to what might be going on?<br>
<br>
as always any input is greatly appreciated :)<br>
<br>
<br></div><div class="Ih2E3d">
On Sun, Aug 17, 2008 at 2:16 PM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>> wrote:<br>
<br>
Hi Alex,<br>
<br>
Actually, after the get_redirects(), you should not do a<br>
rewiteXXXX() - just to t_relay(); the get_redirects() already<br>
populates the new branch with all the information.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
<br>
Ovidiu Sas wrote:<br>
<br>
If you want to rewrite the port, you need to use the following<br>
syntax:<br>
rewritehostport("XXX.XXX.XXX.XXX:ZZZZZ");<br>
where ZZZZZ is the new port.<br>
<br>
<br>
Regards,<br>
Ovidiu Sas<br>
<br>
On Wed, Aug 13, 2008 at 4:54 PM, Alex G<br></div><div class="Ih2E3d">
<<a href="mailto:greekman0000@gmail.com" target="_blank">greekman0000@gmail.com</a> <mailto:<a href="mailto:greekman0000@gmail.com" target="_blank">greekman0000@gmail.com</a>>> wrote:<br>
<br>
unfortunately the solution is a bit vague for what I'm<br>
trying to do...<br>
<br>
<br>
in the 302 packet the contact for redirect is sip<br>
xyz@abc.abc.abc.abc<br>
<br>
failure_route[1] {<br>
if (t_check_status("302")) {<br>
xlog("in redirect failure $fu");<br>
get_redirects("*:1","redirect");<br>
rewritehostport("XXX.XXX.XXX.XXX");<br>
t_relay();<br>
}<br>
<br>
this should take the contact address and rewrite the host<br>
port for it<br>
relaying it to the new location right? should be an<br>
immediate invite to<br>
abc@XXX.XXX.XXX.XXX<br>
<br>
unfortunately it doesn't rewrite the host port. It merely<br>
relays directly to<br>
the contact in the 302 packet xyz@abc.abc.abc.abc<br>
<br>
any ideas would be welcome :)<br>
<br>
thanks<br>
<br>
alex<br>
<br>
On Wed, Aug 13, 2008 at 2:38 PM, Ovidiu Sas<br></div><div class="Ih2E3d">
<<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a> <mailto:<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>>> wrote:<br>
<br>
It is all here:<br>
<a href="http://www.opensips.org/html/uac_redirect.html#id2519995" target="_blank">http://www.opensips.org/html/uac_redirect.html#id2519995</a><br>
<br>
Regards,<br>
Ovidiu Sas<br>
<br>
On Wed, Aug 13, 2008 at 2:03 PM, Alex G<br>
<<a href="mailto:greekman0000@gmail.com" target="_blank">greekman0000@gmail.com</a><br></div><div class="Ih2E3d">
<mailto:<a href="mailto:greekman0000@gmail.com" target="_blank">greekman0000@gmail.com</a>>> wrote:<br>
<br>
I know there was some stuff about how to handle<br>
302s and send forward a<br>
new<br>
invite to the diversion contact on the old mailing<br>
list archives, but<br>
they<br>
are all gone now :(<br>
<br>
wondering if anyone can help me with this.....<br>
<br>
opensips -> ua -> moved -> opensips invite contact<br>
from diversion<br>
<br>
<br>
<br>
basically opensips makes an invite to locally<br>
registered uac, the uac<br>
redirects to an external pstn number XXX-XXX-XXXX,<br>
opensips then needs<br>
to<br>
handle the 302 and generate an invite to XXX-XXX-XXXX<br>
<br>
<br>
any help would be most appreciated<br>
<br>
thanks Alex<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br></div>
<mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>><div class="Ih2E3d"><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br></div>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>><div class="Ih2E3d"><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div>