[SR-Users] Message Routing To/From Gateway

Ed Brady ebrady at talkforgood.com
Fri Oct 26 00:45:41 CEST 2012


After further testing it was found that setting the alias like this somehow
broke outgoing messages. I'm not certain exactly how Kamailio handles
aliases, but it seems like it is not as simple as I expected. I am working
on figuring out a new solution now if anyone has any thoughts.


Thanks,
Ed




On Wed, Oct 24, 2012 at 12:27 AM, Ed Brady <ebrady at talkforgood.com> wrote:

> I was able to resolve the issue by setting the return domain as a local
> domain alias. With the previous setting I had made to forward all non-local
> accounts to our gateway domain, this would allow the improper return domain
> to be seamlessly switched to the correct domain before being forwarded out
> of our server. Now users can have normal two way conversations despite a
> poor design by our vendor.
>
> Thanks for a giant push in the right direction!
>
>
> Ed
>
>
>
>
>
> On Mon, Oct 22, 2012 at 4:02 PM, Ed Brady <ebrady at talkforgood.com> wrote:
>
>> I have this all working now. I had previously configured this as a
>> gateway and once issues were fixed on our vendor's end, it worked. Is there
>> a disadvantage to using this method rather than the permissions module?
>>
>> On a related note (though maybe not related enough), when we get
>> responses from their system it comes back with a different domain in the
>> URI than what they require us to send to. When questioned about this they
>> said we would need to handle it on our end. Is there a common method for
>> checking the to URI for a particular string (in this case the domain),
>> changing it, and then forwarding it?
>>
>>
>> Thanks,
>> Ed
>>
>>
>>
>>
>> On Sat, Oct 20, 2012 at 7:23 PM, Vitaliy Aleksandrov <
>> vitalik.voip at gmail.com> wrote:
>>
>>>  "Permissions" module should help you. If allowed ip addresses are kept
>>> in a database you can reload them by MI command without kamailio restart.
>>> As I remember "permissions" module allows to create groups of ip
>>> addresses, so you can create such a group for hosts which you want to
>>> receive MESSAGE requests from.
>>>
>>>  I tested this example and it worked for me. I was misunderstanding
>>> some of the values and thought they applied to users being registered or
>>> not.
>>>
>>> I am still uncertain what setting applies to allowing all traffic
>>> inbound from a particular address. Any tips on this would be appreciated.
>>>
>>>
>>> Thanks,
>>> Ed
>>>
>>>
>>>
>>> On Fri, Oct 19, 2012 at 1:41 PM, Ed Brady <ebrady at talkforgood.com>wrote:
>>>
>>>> I was looking at this logic some more and wanted to clarify my
>>>> configuration. I need to base the R-URI rewrite and MESSAGE forward based
>>>> on whether the account exists as a local subscriber or not rather than
>>>> whether the user is registered or not. This is connecting to an SMS
>>>> provider using SIP.
>>>>
>>>> I excitedly looked into the SMS module but this appears to only be if
>>>> you are dealing with a GSM modem and not sending/receiving SIP MESSAGEs
>>>> with an SMS gateway.
>>>>
>>>> Any resources you can point me to would be extremely helpful, thanks!
>>>>
>>>>
>>>> Ed
>>>>
>>>>
>>>>
>>>> On Fri, Oct 19, 2012 at 10:42 AM, Ed Brady <ebrady at talkforgood.com>wrote:
>>>>
>>>>> Will this also permit incoming messages from this domain? Do I need to
>>>>> add the gateway in any other settings besides the one you outlined?
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Ed
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  On Fri, Oct 19, 2012 at 6:17 AM, Vitaliy Aleksandrov <
>>>>> vitalik.voip at gmail.com> wrote:
>>>>>
>>>>>>  If I understood you right you just need to rewrite R-URI domain and
>>>>>> forward MESSAGE if a user in not registered.
>>>>>>
>>>>>> if (!lookup("location")) {
>>>>>>     switch($retcode) {
>>>>>>         case -1:
>>>>>>             $rd = "gatewaydomain.com";
>>>>>>             t_relay();
>>>>>>             exit;
>>>>>>         default:
>>>>>>             sl_send_reply("404", "Not Found");
>>>>>>             exit;
>>>>>>     }
>>>>>> }
>>>>>>
>>>>>>
>>>>>> I am trying to route SIP messages to a gateway. I am using SIP
>>>>>> MESSAGE over UDP as well as the MSILO module for storing messages for users
>>>>>> that aren't currently logged in. I have read through the Dynamic Routing
>>>>>> module info but am not able to determine the best way to accomplish the
>>>>>> routing I require. Our scenario is outlined below.
>>>>>>
>>>>>> User A sends a message addressed to "sip:12345678900 at mydomain.com"
>>>>>> Kamailio at mydomain.com checks if 12345678900 is a registered user
>>>>>> in the system.
>>>>>> If not, the message header is translated to
>>>>>> "sip:12345678900 at gatewaydomain..com"<sip:12345678900 at gatewaydomain..com>and forwarded.
>>>>>> Incoming messages need to be accepted from their IP as well.
>>>>>>
>>>>>> It would also be useful if the address came as "
>>>>>> sip:2345678900 at mydomain.com" could be translated to "sip:*1*
>>>>>> 2345678900 at gatewaydomain.com".
>>>>>>
>>>>>>
>>>>>> Is there any built in functionality I can configure for this, or will
>>>>>> this need to be scripted?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Ed
>>>>>>
>>>>>>
>>>>>>  _______________________________________________
>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>>>>>> list
>>>>>> sr-users at lists.sip-router.org
>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121025/506fb41a/attachment-0001.htm>


More information about the sr-users mailing list