Hi, I looking information how to distinguish whether the packet is directed to the Astersik (my platform) or to the customer (softphone / sip client ).
This is a question of your own business rules.
The most common way to do it is to use something like the 'permissions' module. Build a 'trusted' table with all your Asterisk gateway IPs, and then do the following when you receive an initial INVITE:
if(allow_trusted()) { # Must be from platform gateways to customer - treat as # "inbound".
... } else { # Do authentication challenge and treat as "outbound" # from customer softphone.
... }
-- Alex
On Wed, Sep 11, 2019 at 10:46:49PM +0200, przeqpiciel wrote:
Hi, I looking information how to distinguish whether the packet is directed to the Astersik (my platform) or to the customer (softphone / sip client ).
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
You may also want to consider dispatcher module's ds_is_from_list. https://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatch...
rgds, Loi Dang Thanh Phone : +84. 774.735.448 Email : loi.dangthanh@gmail.com
On Thu, Sep 12, 2019 at 3:54 AM Alex Balashov abalashov@evaristesys.com wrote:
This is a question of your own business rules.
The most common way to do it is to use something like the 'permissions' module. Build a 'trusted' table with all your Asterisk gateway IPs, and then do the following when you receive an initial INVITE:
if(allow_trusted()) { # Must be from platform gateways to customer - treat as # "inbound".
...
} else { # Do authentication challenge and treat as "outbound" # from customer softphone.
...
}
-- Alex
On Wed, Sep 11, 2019 at 10:46:49PM +0200, przeqpiciel wrote:
Hi, I looking information how to distinguish whether the packet is directed
to
the Astersik (my platform) or to the customer (softphone / sip client ).
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On 11.09.19 22:53, Alex Balashov wrote:
This is a question of your own business rules.
The most common way to do it is to use something like the 'permissions' module. Build a 'trusted' table with all your Asterisk gateway IPs, and then do the following when you receive an initial INVITE:
Just a remark: if it is about matching on IP address (subnet address), it is better to use address table with allow_source_address() instead of trusted table with allow trusted -- it is from the same permission module.
Cheers, Daniel
if(allow_trusted()) { # Must be from platform gateways to customer - treat as # "inbound".
...
} else { # Do authentication challenge and treat as "outbound" # from customer softphone.
...
}
-- Alex
On Wed, Sep 11, 2019 at 10:46:49PM +0200, przeqpiciel wrote:
Hi, I looking information how to distinguish whether the packet is directed to the Astersik (my platform) or to the customer (softphone / sip client ). _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
My issue is that I need regarding to direction add record-route or remove it
czw., 12 wrz 2019 o 09:22 Daniel-Constantin Mierla miconda@gmail.com napisał(a):
On 11.09.19 22:53, Alex Balashov wrote:
This is a question of your own business rules.
The most common way to do it is to use something like the 'permissions' module. Build a 'trusted' table with all your Asterisk gateway IPs, and then do the following when you receive an initial INVITE:
Just a remark: if it is about matching on IP address (subnet address), it is better to use address table with allow_source_address() instead of trusted table with allow trusted -- it is from the same permission module.
Cheers, Daniel
if(allow_trusted()) { # Must be from platform gateways to customer - treat as # "inbound".
...
} else { # Do authentication challenge and treat as "outbound" # from customer softphone.
...
}
-- Alex
On Wed, Sep 11, 2019 at 10:46:49PM +0200, przeqpiciel wrote:
Hi, I looking information how to distinguish whether the packet is directed
to
the Astersik (my platform) or to the customer (softphone / sip client ). _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
can you explain a bit more what you want to achieve? Usually the record-route handling is just done automatically by the rr and the record_route()/loose_route() functions.
Cheers,
Henning
Am 12.09.19 um 18:03 schrieb przeqpiciel: My issue is that I need regarding to direction add record-route or remove it
czw., 12 wrz 2019 o 09:22 Daniel-Constantin Mierla <miconda@gmail.commailto:miconda@gmail.com> napisał(a):
On 11.09.19 22:53, Alex Balashov wrote:
This is a question of your own business rules.
The most common way to do it is to use something like the 'permissions' module. Build a 'trusted' table with all your Asterisk gateway IPs, and then do the following when you receive an initial INVITE:
Just a remark: if it is about matching on IP address (subnet address), it is better to use address table with allow_source_address() instead of trusted table with allow trusted -- it is from the same permission module.
Cheers, Daniel
if(allow_trusted()) { # Must be from platform gateways to customer - treat as # "inbound".
...
} else { # Do authentication challenge and treat as "outbound" # from customer softphone.
...
}
-- Alex
On Wed, Sep 11, 2019 at 10:46:49PM +0200, przeqpiciel wrote:
Hi, I looking information how to distinguish whether the packet is directed to the Astersik (my platform) or to the customer (softphone / sip client ). _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comhttp://www.asipto.com www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Kamailio Merchandising - https://skalatan.de/merchandising/ Kamailio services - https://skalatan.de/services Henning Westerholt - https://skalatan.de/blog/