Hi,
I want openSER to act ad a B2B UA, replacing TO, FROM and URI fields. I know "rewritehostport" function allow me to modify URI. What are functions can be used to change TO and FROM fields.
Thanks,
_________________________________________________________________ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!55...
Hello,
On 10/06/08 18:02, Alex R.S.M wrote:
Hi,
I want openSER to act ad a B2B UA, replacing TO, FROM and URI fields. I know "rewritehostport" function allow me to modify URI. What are functions can be used to change TO and FROM fields.
To change From, you can use uac module: http://www.kamailio.org/docs/modules/1.4.x/uac.html
It is not advisable to change To in a SIP proxy (as kamailio/openser is), but you can use replace/header-related functions from textops module:
http://www.kamailio.org/docs/modules/1.4.x/textops.html
Cheers, Daniel
There's a lot more to being a B2BUA than just changing some headers. What you are suggesting is a phenomenal waste of time and energy. If you want a lightweight B2BUA for a specific purpose, check out Yate or similar.
Also, there's a lot more attributes that define a logical call leg. These include the GUID, the tags, etc. Your approach is superficial.
Alex R.S.M wrote:
Hi,
I want openSER to act ad a B2B UA, replacing TO, FROM and URI fields. I know "rewritehostport" function allow me to modify URI. What are functions can be used to change TO and FROM fields.
Thanks,
Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn Now http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_getmore_092008
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
Hello,
On 10/06/08 20:22, Alex Balashov wrote:
There's a lot more to being a B2BUA than just changing some headers. What you are suggesting is a phenomenal waste of time and energy. If you want a lightweight B2BUA for a specific purpose, check out Yate or similar.
Also, there's a lot more attributes that define a logical call leg. These include the GUID, the tags, etc. Your approach is superficial.
indeed, a b2bua is something very complex, even the definition is not clear. Also, it is not recommended to change the URI in From/To headers because of backward compatibility with sip 1.0.
However, if it is about a controlled environment where all endpoints are sip 2.0 compliant, then a dialog is matched only by call-id, from tag and to tag. In such situation changing the From/To URI is harmless - I have done it many times for limited purposes (anonymous, To URI number format) and simply works.
Cheers, Daniel
Alex R.S.M wrote:
Hi,
I want openSER to act ad a B2B UA, replacing TO, FROM and URI fields. I know "rewritehostport" function allow me to modify URI. What are functions can be used to change TO and FROM fields.
Thanks,
Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn Now http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_getmore_092008
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
El Lunes, 6 de Octubre de 2008, Alex R.S.M escribió:
Hi,
I want openSER to act ad a B2B UA, replacing TO, FROM and URI fields. I know "rewritehostport" function allow me to modify URI. What are functions can be used to change TO and FROM fields.
What you say doesn't make sense. - First: Kamailio is a proxy, not a B2BUA, it **can't** act as a B2BUA (are you sure of what you think you want to get?). - Second: Being a B2BUA involves much more than just changing From and To (why to change "To"?).
On 10/08/08 00:55, Iñaki Baz Castillo wrote:
El Lunes, 6 de Octubre de 2008, Alex R.S.M escribió:
Hi,
I want openSER to act ad a B2B UA, replacing TO, FROM and URI fields. I know "rewritehostport" function allow me to modify URI. What are functions can be used to change TO and FROM fields.
What you say doesn't make sense.
- First: Kamailio is a proxy, not a B2BUA, it **can't** act as a B2BUA (are
you sure of what you think you want to get?).
- Second: Being a B2BUA involves much more than just changing From and To (why
to change "To"?).
With some modules, Kamailio went beyond a SIP proxy. Clear is not a b2bua, but for some limited purposes, Kamailio can do some of b2bua functionalities. For full B2BUA, there are open source options such as asterisk/freeswitch...
Cheers, Daniel
El Miércoles, 8 de Octubre de 2008, Daniel-Constantin Mierla escribió:
With some modules, Kamailio went beyond a SIP proxy. Clear is not a b2bua, but for some limited purposes, Kamailio can do some of b2bua functionalities.
Well, for me a B2BUA is a UAS+UAC, and AFAIK Kamailio is a proxy and a UAS (registrar, presence server...) but not a B2BUA. Maybe the IMC module is a B2BUA for MESSAGE's :)
Hello,
On 10/08/08 22:37, Iñaki Baz Castillo wrote:
El Miércoles, 8 de Octubre de 2008, Daniel-Constantin Mierla escribió:
With some modules, Kamailio went beyond a SIP proxy. Clear is not a b2bua, but for some limited purposes, Kamailio can do some of b2bua functionalities.
Well, for me a B2BUA is a UAS+UAC,
better said UA+UA where UA=UAC+UAS
and AFAIK Kamailio is a proxy and a UAS (registrar, presence server...) but not a B2BUA.
Definitely is not a B2BUA, but more than a proxy if you load some modules. Back to SIP terminology :-), can initiate and can answer requests, so it is just UA, in this terms.
Maybe the IMC module is a B2BUA for MESSAGE's :)
There is UAS+UAC (answers to one and then sends many) :-)
Cheers, Daniel
Hi Daniel,
In the spirit of having Kamailio doing a bit more than just a proxy - is there a trick for handling 302's from a SIP client and starting a new leg, opposed to just sending the 302 back up the carrierroute leg?
I have a carrier that doesn't support 302 redirects, so I need to find a way to generate a new leg to go back out the carrier.
I am running 1.4.0 .... Thanks mucho,
-graham
On 10/8/08 9:56 PM, "Daniel-Constantin Mierla" miconda@gmail.com wrote:
Hello,
On 10/08/08 22:37, Iñaki Baz Castillo wrote:
El Miércoles, 8 de Octubre de 2008, Daniel-Constantin Mierla escribió:
With some
modules, Kamailio went beyond a SIP proxy. Clear is not a
b2bua, but for
some limited purposes, Kamailio can do some of b2bua
functionalities.
Well, for me a B2BUA is a UAS+UAC,
better said UA+UA where UA=UAC+UAS
and AFAIK Kamailio is a proxy and a UAS (registrar, presence server...) but not a B2BUA.
Definitely is not a B2BUA, but more than a proxy if you load
some
modules. Back to SIP terminology :-), can initiate and can answer
requests, so it is just UA, in this terms.
Maybe the IMC module is a B2BUA for MESSAGE's :)
There is UAS+UAC (answers to one and then sends many)
:-)
Cheers, Daniel
Hello Graham,
I guess you are looking for this one:
http://www.kamailio.org/docs/modules/1.4.x/uac_redirect.html
Cheers, Daniel
On 10/09/08 06:13, Graham Wooden wrote:
Hi Daniel,
In the spirit of having Kamailio doing a bit more than just a proxy - is there a trick for handling 302's from a SIP client and starting a new leg, opposed to just sending the 302 back up the carrierroute leg?
I have a carrier that doesn't support 302 redirects, so I need to find a way to generate a new leg to go back out the carrier.
I am running 1.4.0 .... Thanks mucho,
-graham
On 10/8/08 9:56 PM, "Daniel-Constantin Mierla" miconda@gmail.com wrote:
Hello,
On 10/08/08 22:37, Iñaki Baz Castillo wrote:
El Miércoles, 8 de Octubre de 2008, Daniel-Constantin Mierla escribió:
With some
modules, Kamailio went beyond a SIP proxy. Clear is not a
b2bua, but for
some limited purposes, Kamailio can do some of b2bua
functionalities.
Well, for me a B2BUA is a UAS+UAC,
better said UA+UA where UA=UAC+UAS
and AFAIK Kamailio is a proxy and a UAS (registrar, presence server...) but not a B2BUA.
Definitely is not a B2BUA, but more than a proxy if you load
some
modules. Back to SIP terminology :-), can initiate and can answer
requests, so it is just UA, in this terms.
Maybe the IMC module is a B2BUA for MESSAGE's :)
There is UAS+UAC (answers to one and then sends many)
:-)
Cheers, Daniel
Thanks Daniel. I am using that module, but I can't seem to get the carrier to take the new contact. Here is my statement inside the failure_route[1]:
if (t_check_status("302")) { xlog("Got a 302 - redirecting"); get_redirects("*"); t_relay(); }
Pretty straight forward. Maybe the issue is with them still? Thanks,
-graham
On 10/8/08 10:17 PM, "Daniel-Constantin Mierla" miconda@gmail.com wrote:
Hello Graham,
I guess you are looking for this one:
http://www.kamailio.org/docs/modules/1.4.x/uac_redirect.html
Cheers, Daniel
On 10/09/08 06:13, Graham Wooden wrote:
Hi Daniel,
In the spirit of having Kamailio doing a bit more than just a proxy - is there a trick for handling 302's from a SIP client and starting a new leg, opposed to just sending the 302 back up the carrierroute leg?
I have a carrier that doesn't support 302 redirects, so I need to find a way to generate a new leg to go back out the carrier.
I am running 1.4.0 .... Thanks mucho,
-graham
On 10/8/08 9:56 PM, "Daniel-Constantin Mierla" miconda@gmail.com wrote:
Hello,
On 10/08/08 22:37, Iñaki Baz Castillo wrote:
El Miércoles, 8 de Octubre de 2008, Daniel-Constantin Mierla escribió:
With some
modules, Kamailio went beyond a SIP proxy. Clear is not a
b2bua, but for
some limited purposes, Kamailio can do some of b2bua
functionalities.
Well, for me a B2BUA is a UAS+UAC,
better said UA+UA where UA=UAC+UAS
and AFAIK Kamailio is a proxy and a UAS (registrar, presence server...) but not a B2BUA.
Definitely is not a B2BUA, but more than a proxy if you load
some
modules. Back to SIP terminology :-), can initiate and can answer
requests, so it is just UA, in this terms.
Maybe the IMC module is a B2BUA for MESSAGE's :)
There is UAS+UAC (answers to one and then sends many)
:-)
Cheers, Daniel
Graham Wooden writes:
if (t_check_status("302")) { xlog("Got a 302 - redirecting"); get_redirects("*"); t_relay(); }
Pretty straight forward. Maybe the issue is with them still? Thanks,
check with wireshark how the invite after get_redirects("*") looks like.
-- juha
I got word that the carrier doesn't support 302s. Yuck.
That being said - does anyone know any tricks to get this working - in such a way that I can create a new call leg and have the call go back out, preferably within kamailio? Thanks,
-graham
On 10/9/08 12:58 AM, "Juha Heinanen" jh@tutpro.com wrote:
Graham Wooden writes:
if (t_check_status("302")) { xlog("Got a 302 - redirecting"); get_redirects("*"); t_relay(); }
Pretty straight forward. Maybe the issue is with them still? Thanks,
check with wireshark how the invite after get_redirects("*") looks like.
-- juha
Graham Wooden writes:
That being said - does anyone know any tricks to get this working - in such a way that I can create a new call leg and have the call go back out, preferably within kamailio? Thanks,
perhaps i didn't understand what you try to do, but if call comes from pstn to kaamilio, which forwards it to somewhere and gets back 302, then get_redirects() + t_relay() makes kamailio to send a new invite to 302 contacts instead of relaying 302 to your pstn gw.
-- juha
Thanks for the reply Juha ... That is exactly what I am trying to do; and they actually ACK my invite back but then nothing. My bad if I explained it that the 302 actually gets sent back up.
Is this invite supposed to be like any other call, originating from kamailio?
On 10/12/08 10:46 AM, "Juha Heinanen" jh@tutpro.com wrote:
Graham Wooden writes:
That being said - does anyone know any tricks to get this working - in such a way that I can create a new call leg and have the call go back out, preferably within kamailio? Thanks,
perhaps i didn't understand what you try to do, but if call comes from pstn to kaamilio, which forwards it to somewhere and gets back 302, then get_redirects() + t_relay() makes kamailio to send a new invite to 302 contacts instead of relaying 302 to your pstn gw.
-- juha
Graham Wooden writes:
Is this invite supposed to be like any other call, originating from kamailio?
it is not a new call, get_redirects adds new branches to existing call from pstn. when you call t_relay after get_redirects, you should see with wireshark an invite (or invites in case of multiple contacts in 302) to go out from your proxy.
-- juhan
Yup, I see the invite and the corresponding ACK back from them - but that's it. About a second later after getting the ACK back, the caller gets dropped.
Any way to trick them?
On 10/12/08 11:48 AM, "Juha Heinanen" jh@tutpro.com wrote:
Graham Wooden writes:
Is this invite supposed to be like any other call, originating from kamailio?
it is not a new call, get_redirects adds new branches to existing call from pstn. when you call t_relay after get_redirects, you should see with wireshark an invite (or invites in case of multiple contacts in 302) to go out from your proxy.
-- juhan
El Domingo, 12 de Octubre de 2008, Graham Wooden escribió:
Yup, I see the invite and the corresponding ACK back from them
What do you mean? the server receiving the INVITE doesn't reply an ACK. You should see something as:
UAC Kamailio UAS1 UAS2
INVITE ----> INVITE -----> <-- 302 "UAS2" INVITE ---------------------> <--------------------------- 200 <------- 200 ACK --------> ACK -------------------------->
- but that's
it. About a second later after getting the ACK back, the caller gets dropped.
Are you sure Kamailio is not forwarding the 302 upstream? does the 302 arrive to UAC?
Graham Wooden writes:
Yup, I see the invite and the corresponding ACK back from them - but that's it. About a second later after getting the ACK back, the caller gets dropped.
i still don't get it. it should go like this:
pstn gw -> invite -> kamailio -> invite -> uas1 <- 302 <- -> invite -> uas2 <- 200 <- 200 <- -> ack -> ack -> ack
-- juha
My capture is attached. Does that help? Thanks for looking at this ...
On 10/12/08 12:01 PM, "Juha Heinanen" jh@tutpro.com wrote:
Graham Wooden writes:
Yup, I see the invite and the corresponding ACK back from them - but that's it. About a second later after getting the ACK back, the caller gets dropped.
i still don't get it. it should go like this:
pstn gw -> invite -> kamailio -> invite -> uas1 <- 302 <- -> invite -> uas2 <- 200 <- 200 <- -> ack -> ack -> ack
-- juha
your cap looks weird. your proxy receives invite from (i think) gw, forwards it, and then sends 407 to gw. try to check from your config file, why your proxy challenges the invite after it has forwarded it. perhaps your cap does not include all packets (all interfaces).
-- juha
Yeah, I see that 407 Proxy Auth too, but I am not sure where to check for that.
Here is my only challenge statement:
if (is_method("REGISTER")) { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); exit; } . . .
On 10/12/08 12:23 PM, "Juha Heinanen" jh@tutpro.com wrote:
your cap looks weird. your proxy receives invite from (i think) gw, forwards it, and then sends 407 to gw. try to check from your config file, why your proxy challenges the invite after it has forwarded it. perhaps your cap does not include all packets (all interfaces).
-- juha
Graham Wooden writes:
Yeah, I see that 407 Proxy Auth too, but I am not sure where to check for that.
Here is my only challenge statement:
if (is_method("REGISTER")) { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); exit; }
407 comes from proxy_challenge. either your config has one or not all packets were shown in capture.
this starts to consume too many cycles that are away from writing code. dig into your config file and make sure that wireshark captures all packets.
-- juha
Gotcha. Well, I re-ran the capture on another test call and ended the capture a few seconds after I hung up, and still shows the same path.
Ok, here is my proxy_challenge; I put that xlog in it, and sure enough it's entering. Now, I have my provider's IP in my trusted table, so I am not sure why it's challenging...
if (!(method=="REGISTER")) { if (!allow_trusted()) { if (!proxy_authorize("", "subscriber")) { $var(debug) = proxy_authorize("", "subscriber"); xlog("L_INFO", "Proxy authentication failed - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); proxy_challenge("", "0"); exit; } fix_nated_sdp("11"); consume_credentials(); # at this point caller is authenticated } }
On 10/12/08 12:32 PM, "Juha Heinanen" jh@tutpro.com wrote:
Graham Wooden writes:
Yeah, I see that 407 Proxy Auth too, but I am not sure where to check for that.
Here is my only challenge statement:
if (is_method("REGISTER")) { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); exit; }
407 comes from proxy_challenge. either your config has one or not all packets were shown in capture.
this starts to consume too many cycles that are away from writing code. dig into your config file and make sure that wireshark captures all packets.
-- juha
Well, I got the 407 solved - I didn't have my loopback or enet address in the trusted table.
So, I am closer. Next step is to get a B2BUA installed, like rtpproxy to handle the audio, since I don't proxy any audio. Any examples out there where I can initiate the audio for this type of call? Again, I don't currently nor do I want to handle the audio for 'every' call.
Thanks,
-graham
On 10/12/08 12:45 PM, "Graham Wooden" graham@g-rock.net wrote:
Gotcha. Well, I re-ran the capture on another test call and ended the capture a few seconds after I hung up, and still shows the same path.
Ok, here is my proxy_challenge; I put that xlog in it, and sure enough it's entering. Now, I have my provider's IP in my trusted table, so I am not sure why it's challenging...
if (!(method=="REGISTER")) { if (!allow_trusted()) { if (!proxy_authorize("", "subscriber")) { $var(debug) = proxy_authorize("", "subscriber"); xlog("L_INFO", "Proxy authentication failed - M=$rm
RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); proxy_challenge("", "0"); exit; } fix_nated_sdp("11"); consume_credentials(); # at this point caller is authenticated } }
On 10/12/08 12:32 PM, "Juha Heinanen" jh@tutpro.com wrote:
Graham Wooden writes:
Yeah, I see that 407 Proxy Auth too, but I am not sure where to check for that.
Here is my only challenge statement:
if (is_method("REGISTER")) { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); exit; }
407 comes from proxy_challenge. either your config has one or not all packets were shown in capture.
this starts to consume too many cycles that are away from writing code. dig into your config file and make sure that wireshark captures all packets.
-- juha
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
El Domingo, 12 de Octubre de 2008, Graham Wooden escribió:
Thanks for the reply Juha ... That is exactly what I am trying to do; and they actually ACK my invite back but then nothing. My bad if I explained it that the 302 actually gets sent back up.
Is this invite supposed to be like any other call, originating from kamailio?
Kamailio doesn't originate INVITE's. The "Contact" returned in a 302 response can be added by Kamailio as a new branch to do serial forking. But it's just forking.