Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread Amir
Thank you Fred, Yes I think I would go for that.

On Sun, Jul 14, 2019 at 6:06 PM Fred Posner  wrote:

> All of these seem like hacks to resolve the problem of you not being able
> to resolve the hostname.
>
> Perhaps there’s a docker setting or dns you can use to provide stability
> or investigate why the host isn’t being resolved.
>
> If the host doesn’t exist when you start kamailio then clearly it will be
> down and a better way would be to add the dispatcher entries when the host
> exists and reload.
>
> If you search for kamailio and docker, Sean McCord has discussed this at
> both astricon and kamailio world.
>
> -- Fred
>
>
>
> On Jul 14, 2019, at 09:20, David Villasmil 
> wrote:
>
> If the dns resolution fails, don’t you get the event route
> dispatcher:dst-down
>  fired?
> You could use that route to remove the entry from the dispatcher list.
>
> David
>
> On Sun, 14 Jul 2019 at 12:29, Amir  wrote:
>
>> Thank you, Maybe I should develop a health check mechanism and save the
>> result in kamailio db and after that:
>> kamctl dispatcher reload
>>
>> On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov 
>> wrote:
>>
>>> as option you can reload dispatcher table instead of kamailio restart.
>>> kamctl dispatcher reload
>>>
>>>
>>>
>>> On Sun, Jul 14, 2019 at 1:27 PM Amir  wrote:
>>>
 Sorry for mistyping :
 I can make it work like this:
 Start Kamailio first Then start asterisk containers Then restart
 *KAMAILIO*


 On Sun, Jul 14, 2019 at 2:50 PM Amir  wrote:

> Hi Henning
> Thank you for clearing that up, I have 3 problem which you have
> mentioned 2 of them:
> - because of the missing DNS entry your Kamailio would not (re)start
> properly: I tried flag 16  as you mentioned but still dose not work
> 1 sip:asterisk:7060 16
> 1 sip:asterisk2:7060 16
> 1 sip:asterisk3:7060 16
> - because of the missing DNS entry the dispatcher module would not
> detect the asterisk server as "down"
> - because of the missing DNS entry my Asterisks would not (re)start
> properly
> maybe I should try asterisk realtime for the last problem
>
> I can make it work like this:
> Start Kamailio first Then start asterisk containers Then restart
> astersik
>
> Cheers
> Amir
>
>
> On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt 
> wrote:
>
>> Hello Amir,
>>
>> what is your issue exactly:
>>
>> - because of the missing DNS entry the dispatcher module would not
>> detect the asterisk server as "down"
>>
>> - because of the missing DNS entry your Kamailio would not (re)start
>> properly
>>
>> You could try with flag 16 to disable DNS resolution at startup in
>> your dispatcher file:
>>
>>
>> https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140
>>
>> Cheers,
>>
>> Henning
>> Am 14.07.19 um 09:33 schrieb Amir:
>>
>> I do not have a DNS server, Docker User-defined networks has it's own
>> built in DNS server,
>> The problem is when I stop a container its DNS record would be
>> deleted and therefore kamailio server could not check server health.
>> I think if I could tell kamailio server that IF you did not find a
>> DNS record it means that a server is down my solution would work.
>>
>> On Sat, Jul 13, 2019 at 10:56 PM Mojtaba  wrote:
>>
>>> Hello,
>>> Did you add SRV record for each server in your DNS server?
>>>
>>> On Sat, Jul 13, 2019 at 6:07 PM Fred Posner  wrote:
>>> >
>>> > The error indicates kamailio can not resolve the location of
>>> asterisk2. Try checking the dns (can you resolve it on the kamailio 
>>> box?)
>>> or using the IP.
>>> >
>>> > -- Fred
>>> >
>>> >
>>> > On Jul 13, 2019, at 07:09, Amir  wrote:
>>> >
>>> > Hi
>>> > I have created a kamailio container with docker and two asterisk
>>> container
>>> > And this is my dispatcher list:
>>> > 1 sip:asterisk:5060
>>> > 1 sip:asterisk2:5060
>>> > and this is my both asterisk SIP.conf
>>> > [Kamailio]
>>> > host=kamailio
>>> > port=5060
>>> > insecure=invite
>>> > type=friend
>>> > context=from-internal
>>> >
>>> > The problem is that I use User-defined networks which has its own
>>> DNS
>>> > when a container starts a dns record would be set
>>> > If I start a kamailio first then start two asterisks the asterisk
>>> works fine
>>> > because the name "kamailio" has been set in docker dns
>>> > but I should restart the kamailio because at startup It could not
>>> resolve astersik dns records
>>> > after the everything works fine but if the any of the asterisk
>>> instances crash/stop kamailio
>>> > can not detect that because a dns record would not be available:
>>> >
>>> > 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su():
>>> 

Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread Amir
Thank you David, I would try that later.

On Sun, Jul 14, 2019 at 6:06 PM Fred Posner  wrote:

> All of these seem like hacks to resolve the problem of you not being able
> to resolve the hostname.
>
> Perhaps there’s a docker setting or dns you can use to provide stability
> or investigate why the host isn’t being resolved.
>
> If the host doesn’t exist when you start kamailio then clearly it will be
> down and a better way would be to add the dispatcher entries when the host
> exists and reload.
>
> If you search for kamailio and docker, Sean McCord has discussed this at
> both astricon and kamailio world.
>
> -- Fred
>
>
>
> On Jul 14, 2019, at 09:20, David Villasmil 
> wrote:
>
> If the dns resolution fails, don’t you get the event route
> dispatcher:dst-down
>  fired?
> You could use that route to remove the entry from the dispatcher list.
>
> David
>
> On Sun, 14 Jul 2019 at 12:29, Amir  wrote:
>
>> Thank you, Maybe I should develop a health check mechanism and save the
>> result in kamailio db and after that:
>> kamctl dispatcher reload
>>
>> On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov 
>> wrote:
>>
>>> as option you can reload dispatcher table instead of kamailio restart.
>>> kamctl dispatcher reload
>>>
>>>
>>>
>>> On Sun, Jul 14, 2019 at 1:27 PM Amir  wrote:
>>>
 Sorry for mistyping :
 I can make it work like this:
 Start Kamailio first Then start asterisk containers Then restart
 *KAMAILIO*


 On Sun, Jul 14, 2019 at 2:50 PM Amir  wrote:

> Hi Henning
> Thank you for clearing that up, I have 3 problem which you have
> mentioned 2 of them:
> - because of the missing DNS entry your Kamailio would not (re)start
> properly: I tried flag 16  as you mentioned but still dose not work
> 1 sip:asterisk:7060 16
> 1 sip:asterisk2:7060 16
> 1 sip:asterisk3:7060 16
> - because of the missing DNS entry the dispatcher module would not
> detect the asterisk server as "down"
> - because of the missing DNS entry my Asterisks would not (re)start
> properly
> maybe I should try asterisk realtime for the last problem
>
> I can make it work like this:
> Start Kamailio first Then start asterisk containers Then restart
> astersik
>
> Cheers
> Amir
>
>
> On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt 
> wrote:
>
>> Hello Amir,
>>
>> what is your issue exactly:
>>
>> - because of the missing DNS entry the dispatcher module would not
>> detect the asterisk server as "down"
>>
>> - because of the missing DNS entry your Kamailio would not (re)start
>> properly
>>
>> You could try with flag 16 to disable DNS resolution at startup in
>> your dispatcher file:
>>
>>
>> https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140
>>
>> Cheers,
>>
>> Henning
>> Am 14.07.19 um 09:33 schrieb Amir:
>>
>> I do not have a DNS server, Docker User-defined networks has it's own
>> built in DNS server,
>> The problem is when I stop a container its DNS record would be
>> deleted and therefore kamailio server could not check server health.
>> I think if I could tell kamailio server that IF you did not find a
>> DNS record it means that a server is down my solution would work.
>>
>> On Sat, Jul 13, 2019 at 10:56 PM Mojtaba  wrote:
>>
>>> Hello,
>>> Did you add SRV record for each server in your DNS server?
>>>
>>> On Sat, Jul 13, 2019 at 6:07 PM Fred Posner  wrote:
>>> >
>>> > The error indicates kamailio can not resolve the location of
>>> asterisk2. Try checking the dns (can you resolve it on the kamailio 
>>> box?)
>>> or using the IP.
>>> >
>>> > -- Fred
>>> >
>>> >
>>> > On Jul 13, 2019, at 07:09, Amir  wrote:
>>> >
>>> > Hi
>>> > I have created a kamailio container with docker and two asterisk
>>> container
>>> > And this is my dispatcher list:
>>> > 1 sip:asterisk:5060
>>> > 1 sip:asterisk2:5060
>>> > and this is my both asterisk SIP.conf
>>> > [Kamailio]
>>> > host=kamailio
>>> > port=5060
>>> > insecure=invite
>>> > type=friend
>>> > context=from-internal
>>> >
>>> > The problem is that I use User-defined networks which has its own
>>> DNS
>>> > when a container starts a dns record would be set
>>> > If I start a kamailio first then start two asterisks the asterisk
>>> works fine
>>> > because the name "kamailio" has been set in docker dns
>>> > but I should restart the kamailio because at startup It could not
>>> resolve astersik dns records
>>> > after the everything works fine but if the any of the asterisk
>>> instances crash/stop kamailio
>>> > can not detect that because a dns record would not be available:
>>> >
>>> > 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su():
>>> could 

[SR-Users] opt_reply(): called for non-OPTIONS request

2019-07-14 Thread Alexandru Covalschi
Hello list,

if KSR.is_OPTIONS() and KSR.is_myself_ruri():
KSR.x.modf("options_reply");
exit();

with a valid URI (no username) gives the subj output (opt_reply(): called for 
non-OPTIONS request)
How could that be? 
Python KEMI, 5.2.3, docker.


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread David Villasmil
If the dns resolution fails, don’t you get the event route
dispatcher:dst-down
 fired?
You could use that route to remove the entry from the dispatcher list.

David

On Sun, 14 Jul 2019 at 12:29, Amir  wrote:

> Thank you, Maybe I should develop a health check mechanism and save the
> result in kamailio db and after that:
> kamctl dispatcher reload
>
> On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov 
> wrote:
>
>> as option you can reload dispatcher table instead of kamailio restart.
>> kamctl dispatcher reload
>>
>>
>>
>> On Sun, Jul 14, 2019 at 1:27 PM Amir  wrote:
>>
>>> Sorry for mistyping :
>>> I can make it work like this:
>>> Start Kamailio first Then start asterisk containers Then restart
>>> *KAMAILIO*
>>>
>>>
>>> On Sun, Jul 14, 2019 at 2:50 PM Amir  wrote:
>>>
 Hi Henning
 Thank you for clearing that up, I have 3 problem which you have
 mentioned 2 of them:
 - because of the missing DNS entry your Kamailio would not (re)start
 properly: I tried flag 16  as you mentioned but still dose not work
 1 sip:asterisk:7060 16
 1 sip:asterisk2:7060 16
 1 sip:asterisk3:7060 16
 - because of the missing DNS entry the dispatcher module would not
 detect the asterisk server as "down"
 - because of the missing DNS entry my Asterisks would not (re)start
 properly
 maybe I should try asterisk realtime for the last problem

 I can make it work like this:
 Start Kamailio first Then start asterisk containers Then restart
 astersik

 Cheers
 Amir


 On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt 
 wrote:

> Hello Amir,
>
> what is your issue exactly:
>
> - because of the missing DNS entry the dispatcher module would not
> detect the asterisk server as "down"
>
> - because of the missing DNS entry your Kamailio would not (re)start
> properly
>
> You could try with flag 16 to disable DNS resolution at startup in
> your dispatcher file:
>
>
> https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140
>
> Cheers,
>
> Henning
> Am 14.07.19 um 09:33 schrieb Amir:
>
> I do not have a DNS server, Docker User-defined networks has it's own
> built in DNS server,
> The problem is when I stop a container its DNS record would be deleted
> and therefore kamailio server could not check server health.
> I think if I could tell kamailio server that IF you did not find a DNS
> record it means that a server is down my solution would work.
>
> On Sat, Jul 13, 2019 at 10:56 PM Mojtaba  wrote:
>
>> Hello,
>> Did you add SRV record for each server in your DNS server?
>>
>> On Sat, Jul 13, 2019 at 6:07 PM Fred Posner  wrote:
>> >
>> > The error indicates kamailio can not resolve the location of
>> asterisk2. Try checking the dns (can you resolve it on the kamailio box?)
>> or using the IP.
>> >
>> > -- Fred
>> >
>> >
>> > On Jul 13, 2019, at 07:09, Amir  wrote:
>> >
>> > Hi
>> > I have created a kamailio container with docker and two asterisk
>> container
>> > And this is my dispatcher list:
>> > 1 sip:asterisk:5060
>> > 1 sip:asterisk2:5060
>> > and this is my both asterisk SIP.conf
>> > [Kamailio]
>> > host=kamailio
>> > port=5060
>> > insecure=invite
>> > type=friend
>> > context=from-internal
>> >
>> > The problem is that I use User-defined networks which has its own
>> DNS
>> > when a container starts a dns record would be set
>> > If I start a kamailio first then start two asterisks the asterisk
>> works fine
>> > because the name "kamailio" has been set in docker dns
>> > but I should restart the kamailio because at startup It could not
>> resolve astersik dns records
>> > after the everything works fine but if the any of the asterisk
>> instances crash/stop kamailio
>> > can not detect that because a dns record would not be available:
>> >
>> > 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su():
>> could not resolve hostname: "asterisk2"
>> > 17(22) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve
>> "asterisk2"
>> > 17(22) ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found
>> > 17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set(): unable
>> to ping [sip:asterisk2:5060]
>> >
>> >
>> > It is kind of loop , I think maybe I can fix asterisk problem with
>> asterisk realtime and
>> > set the sip.conf in database.
>> > anyone has any suggestion for this problem?
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> >
>> > ___
>> > Kamailio (SER) - Users 

Re: [SR-Users] Wrong $rm value

2019-07-14 Thread Alexandru Covalschi
Forgot to mention that I do a t_newtran() before t_suspend


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

> 14 июля 2019 г., в 14:40, Alexandru Covalschi <568...@gmail.com> написал(а):
> 
> Hello list,
> 
> I use kamailio 5.2.3 from repo's on stretch in docker. I use python KEMI + 
> async and encountered weird behaviour: after t_continue $rm shows OPTIONS 
> instead of REGISTER/INVITE. I wonder if that's correct behaviour, because for 
> me it looks like a bug. 
> Repeating is easy - just check $rm after t_continue.
> 
> 
> Regards,
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +37367367850
> 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Check if an INVITE comes from uac_reg endpoint

2019-07-14 Thread Brandon Armstead
Perfect :)

On Sat, Jul 13, 2019 at 10:51 PM Diogo Hartmann  wrote:

> Thank you Brandon.
>
> We did it with the uac_reg_lookup function. It worked fine :)
>
> --
>
>
>
> *Diogo Hartmann*
> *Co-founder @ 3C Plus *
> Escritório: 11 4063-7921 ext. 6299
> Celular: 41 99921-7281
> Skype: diogodhh
>
>
>
>
>
>
> Em sex, 12 de jul de 2019 às 03:44, Brandon Armstead 
> escreveu:
>
>> Are you looking for a digest validation or perhaps ip south based or
>> otherwise a header checksum etc there are various ways you could accomplish
>> this.
>>
>> On Thu, Jul 11, 2019 at 11:41 PM Diogo Hartmann 
>> wrote:
>>
>>> Hello Kamailio experts,
>>>
>>> We were already able to register correctly at a SIP Provider using
>>> uacreg table. Now, we would like to validate inbound calls coming from this
>>> registered provider, sending them to a specific dispatcher group.
>>>
>>> I tried reading the uac module docs, found *uac_reg_lookup* function,
>>> but i'm not sure if that's we need.
>>>
>>> Could someone please help me to understand if UAC has a function to do
>>> that, or if we need to make some?
>>>
>>> Thanks!!
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Wrong $rm value

2019-07-14 Thread Alexandru Covalschi
Hello list,

I use kamailio 5.2.3 from repo's on stretch in docker. I use python KEMI + 
async and encountered weird behaviour: after t_continue $rm shows OPTIONS 
instead of REGISTER/INVITE. I wonder if that's correct behaviour, because for 
me it looks like a bug. 
Repeating is easy - just check $rm after t_continue.


Regards,
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +37367367850

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread Amir
Thank you, Maybe I should develop a health check mechanism and save the
result in kamailio db and after that:
kamctl dispatcher reload

On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov  wrote:

> as option you can reload dispatcher table instead of kamailio restart.
> kamctl dispatcher reload
>
>
>
> On Sun, Jul 14, 2019 at 1:27 PM Amir  wrote:
>
>> Sorry for mistyping :
>> I can make it work like this:
>> Start Kamailio first Then start asterisk containers Then restart
>> *KAMAILIO*
>>
>>
>> On Sun, Jul 14, 2019 at 2:50 PM Amir  wrote:
>>
>>> Hi Henning
>>> Thank you for clearing that up, I have 3 problem which you have
>>> mentioned 2 of them:
>>> - because of the missing DNS entry your Kamailio would not (re)start
>>> properly: I tried flag 16  as you mentioned but still dose not work
>>> 1 sip:asterisk:7060 16
>>> 1 sip:asterisk2:7060 16
>>> 1 sip:asterisk3:7060 16
>>> - because of the missing DNS entry the dispatcher module would not
>>> detect the asterisk server as "down"
>>> - because of the missing DNS entry my Asterisks would not (re)start
>>> properly
>>> maybe I should try asterisk realtime for the last problem
>>>
>>> I can make it work like this:
>>> Start Kamailio first Then start asterisk containers Then restart astersik
>>>
>>> Cheers
>>> Amir
>>>
>>>
>>> On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt 
>>> wrote:
>>>
 Hello Amir,

 what is your issue exactly:

 - because of the missing DNS entry the dispatcher module would not
 detect the asterisk server as "down"

 - because of the missing DNS entry your Kamailio would not (re)start
 properly

 You could try with flag 16 to disable DNS resolution at startup in your
 dispatcher file:


 https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140

 Cheers,

 Henning
 Am 14.07.19 um 09:33 schrieb Amir:

 I do not have a DNS server, Docker User-defined networks has it's own
 built in DNS server,
 The problem is when I stop a container its DNS record would be deleted
 and therefore kamailio server could not check server health.
 I think if I could tell kamailio server that IF you did not find a DNS
 record it means that a server is down my solution would work.

 On Sat, Jul 13, 2019 at 10:56 PM Mojtaba  wrote:

> Hello,
> Did you add SRV record for each server in your DNS server?
>
> On Sat, Jul 13, 2019 at 6:07 PM Fred Posner  wrote:
> >
> > The error indicates kamailio can not resolve the location of
> asterisk2. Try checking the dns (can you resolve it on the kamailio box?)
> or using the IP.
> >
> > -- Fred
> >
> >
> > On Jul 13, 2019, at 07:09, Amir  wrote:
> >
> > Hi
> > I have created a kamailio container with docker and two asterisk
> container
> > And this is my dispatcher list:
> > 1 sip:asterisk:5060
> > 1 sip:asterisk2:5060
> > and this is my both asterisk SIP.conf
> > [Kamailio]
> > host=kamailio
> > port=5060
> > insecure=invite
> > type=friend
> > context=from-internal
> >
> > The problem is that I use User-defined networks which has its own DNS
> > when a container starts a dns record would be set
> > If I start a kamailio first then start two asterisks the asterisk
> works fine
> > because the name "kamailio" has been set in docker dns
> > but I should restart the kamailio because at startup It could not
> resolve astersik dns records
> > after the everything works fine but if the any of the asterisk
> instances crash/stop kamailio
> > can not detect that because a dns record would not be available:
> >
> > 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su(): could
> not resolve hostname: "asterisk2"
> > 17(22) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve
> "asterisk2"
> > 17(22) ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found
> > 17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set(): unable to
> ping [sip:asterisk2:5060]
> >
> >
> > It is kind of loop , I think maybe I can fix asterisk problem with
> asterisk realtime and
> > set the sip.conf in database.
> > anyone has any suggestion for this problem?
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> --
> --Mojtaba Esfandiari.S
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 

Re: [SR-Users] kamailio as ICSCF connection with FHoss

2019-07-14 Thread Mojtaba
Sure, No Problem
Thank you


On Sun, Jul 14, 2019 at 1:22 PM Henning Westerholt  wrote:

> Hello Mojtaba,
>
> thank you. If there is something that should be added to the kamailio.cfg
> for this implementation (maybe some comments) just open a pull request.
>
> Cheers,
>
> Henning
> Am 14.07.19 um 10:28 schrieb Mojtaba:
>
> Hello Henning,
> According the 3GPP standards, the IMPU template would be started with '+',
> for this reason in icscf, we have to add '+' to $rU, But in FHOSS the is
> not any IMPU with '+'  prefix as default. There is two way to solve this
> issue:
> 1) Add some new IMPU/IMPI according the 3GPP standards. (Be notice that
> IMPU would be started with '+' or ' tel).
> 2) Have some changes in Kamailio routing block to escape some rules.
> The is no needed to have some changes in ims_icscf module.
>
> With Best Regards.Mojtaba
>
> On Sun, Jul 14, 2019 at 12:38 AM Henning Westerholt 
> wrote:
>
>> Hello Mojtaba,
>>
>> Let us wait for more details from the reporter before coming to a
>> conclusion. Without complete knowledge about the scenario there is always
>> some guessing involved.
>>
>> Cheers,
>>
>> Henning
>>
>> -Original Message-
>> From: sr-users  On Behalf Of Mojtaba
>> Sent: Saturday, July 13, 2019 8:36 PM
>> To: Kamailio (SER) - Users Mailing List ;
>> maryam.baghd...@gmail.com
>> Subject: Re: [SR-Users] kamailio as ICSCF connection with FHoss
>>
>> Hello Mariam,
>> It is worse way that you made choice. There is no needed to change any
>> things in source code.
>> Just dive to kamailio.cfg file and remove "+" prefix  from $rU (IMPU) .
>> It is very straightforward.
>> WIth Best Regards. Mojtaba
>>
>> On Sat, Jul 13, 2019 at 2:55 PM Maryam Baghdadi <
>> maryam.baghd...@gmail.com> wrote:
>> >
>> > Thank you for your help,
>> > I resolved my problem , there was a '+' in public_identity that isn't
>> shown in pcap file and just by printing value public_identity in
>> I_perform_location_information_request() recognized .
>> > I replaced  public_identity = cscf_get_public_identity_from_requri(msg)
>> with  cscf_get_to_uri(msg, _identity) then recompiled ims_icscf
>> module and my problem resolved .
>> >
>> >
>> >
>> > On Wed, Jul 10, 2019 at 3:07 PM Mojtaba  wrote:
>> >>
>> >> Hello,
>> >> of course not, Are you sure the IMPI/IMPU in LRI/LRA message there
>> >> are exist exactly in HSS?
>> >> Or may they are changed with some prefixes like "tel uri" or "+"
>> >> With Regards. Mojtaba
>> >>
>> >> On Wed, Jul 10, 2019 at 2:05 PM Henning Westerholt 
>> wrote:
>> >> >
>> >> > Hello Maryam,
>> >> >
>> >> >
>> >> >
>> >> > I am not an expert on the FHoss, but just some ideas how to
>> investigate it further:
>> >> >
>> >> >
>> >> >
>> >> > Do you get some error message in FHoss?
>> >> > Can you test with some other tool (maybe with a test script) that
>> the FHoss works ok generally?
>> >> > Any error message from ICSCF module in the Kamailio logging?
>> >> >
>> >> >
>> >> >
>> >> > Cheers,
>> >> >
>> >> >
>> >> >
>> >> > Henning
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> >
>> >> > Henning Westerholt - https://skalatan.de/blog/
>> >> >
>> >> > Kamailio services - https://skalatan.de/services
>> >> >
>> >> >
>> >> >
>> >> > From: sr-users  On Behalf Of
>> >> > Maryam Baghdadi
>> >> > Sent: Tuesday, July 9, 2019 10:07 AM
>> >> > To: Kamailio (SER) - Users Mailing List
>> >> > 
>> >> > Subject: [SR-Users] kamailio as ICSCF connection with FHoss
>> >> >
>> >> >
>> >> >
>> >> > hello,
>> >> >
>> >> >
>> >> >
>> >> > I use Kamailio as my Icscf in IMS network .
>> >> >
>> >> > after receiving Invite Request from SCSCF to ICSCF‌, a LIR request
>> sent from ICSCF to FHoss. User_Unknown response received in all states. I
>> checked every thing carefully , users are registered and  defined in HSS
>> and every configuration done . What's wrong? is it possible that icscf has
>> problem? or it can be FHoss bug?
>>
>> --
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://skalatan.de/services
>
>

-- 
--Mojtaba Esfandiari.S
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread Sergey Safarov
as option you can reload dispatcher table instead of kamailio restart.
kamctl dispatcher reload



On Sun, Jul 14, 2019 at 1:27 PM Amir  wrote:

> Sorry for mistyping :
> I can make it work like this:
> Start Kamailio first Then start asterisk containers Then restart
> *KAMAILIO*
>
>
> On Sun, Jul 14, 2019 at 2:50 PM Amir  wrote:
>
>> Hi Henning
>> Thank you for clearing that up, I have 3 problem which you have mentioned
>> 2 of them:
>> - because of the missing DNS entry your Kamailio would not (re)start
>> properly: I tried flag 16  as you mentioned but still dose not work
>> 1 sip:asterisk:7060 16
>> 1 sip:asterisk2:7060 16
>> 1 sip:asterisk3:7060 16
>> - because of the missing DNS entry the dispatcher module would not detect
>> the asterisk server as "down"
>> - because of the missing DNS entry my Asterisks would not (re)start
>> properly
>> maybe I should try asterisk realtime for the last problem
>>
>> I can make it work like this:
>> Start Kamailio first Then start asterisk containers Then restart astersik
>>
>> Cheers
>> Amir
>>
>>
>> On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt 
>> wrote:
>>
>>> Hello Amir,
>>>
>>> what is your issue exactly:
>>>
>>> - because of the missing DNS entry the dispatcher module would not
>>> detect the asterisk server as "down"
>>>
>>> - because of the missing DNS entry your Kamailio would not (re)start
>>> properly
>>>
>>> You could try with flag 16 to disable DNS resolution at startup in your
>>> dispatcher file:
>>>
>>>
>>> https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140
>>>
>>> Cheers,
>>>
>>> Henning
>>> Am 14.07.19 um 09:33 schrieb Amir:
>>>
>>> I do not have a DNS server, Docker User-defined networks has it's own
>>> built in DNS server,
>>> The problem is when I stop a container its DNS record would be deleted
>>> and therefore kamailio server could not check server health.
>>> I think if I could tell kamailio server that IF you did not find a DNS
>>> record it means that a server is down my solution would work.
>>>
>>> On Sat, Jul 13, 2019 at 10:56 PM Mojtaba  wrote:
>>>
 Hello,
 Did you add SRV record for each server in your DNS server?

 On Sat, Jul 13, 2019 at 6:07 PM Fred Posner  wrote:
 >
 > The error indicates kamailio can not resolve the location of
 asterisk2. Try checking the dns (can you resolve it on the kamailio box?)
 or using the IP.
 >
 > -- Fred
 >
 >
 > On Jul 13, 2019, at 07:09, Amir  wrote:
 >
 > Hi
 > I have created a kamailio container with docker and two asterisk
 container
 > And this is my dispatcher list:
 > 1 sip:asterisk:5060
 > 1 sip:asterisk2:5060
 > and this is my both asterisk SIP.conf
 > [Kamailio]
 > host=kamailio
 > port=5060
 > insecure=invite
 > type=friend
 > context=from-internal
 >
 > The problem is that I use User-defined networks which has its own DNS
 > when a container starts a dns record would be set
 > If I start a kamailio first then start two asterisks the asterisk
 works fine
 > because the name "kamailio" has been set in docker dns
 > but I should restart the kamailio because at startup It could not
 resolve astersik dns records
 > after the everything works fine but if the any of the asterisk
 instances crash/stop kamailio
 > can not detect that because a dns record would not be available:
 >
 > 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su(): could
 not resolve hostname: "asterisk2"
 > 17(22) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "asterisk2"
 > 17(22) ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found
 > 17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set(): unable to
 ping [sip:asterisk2:5060]
 >
 >
 > It is kind of loop , I think maybe I can fix asterisk problem with
 asterisk realtime and
 > set the sip.conf in database.
 > anyone has any suggestion for this problem?
 >
 > ___
 > Kamailio (SER) - Users Mailing List
 > sr-users@lists.kamailio.org
 > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
 >
 > ___
 > Kamailio (SER) - Users Mailing List
 > sr-users@lists.kamailio.org
 > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



 --
 --Mojtaba Esfandiari.S

 ___
 Kamailio (SER) - Users Mailing List
 sr-users@lists.kamailio.org
 https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

>>>
>>> ___
>>> Kamailio (SER) - Users Mailing 
>>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> --
>>> Henning Westerholt - https://skalatan.de/blog/
>>> Kamailio services - https://skalatan.de/services
>>>
>>> 

Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread Amir
Sorry for mistyping :
I can make it work like this:
Start Kamailio first Then start asterisk containers Then restart *KAMAILIO*


On Sun, Jul 14, 2019 at 2:50 PM Amir  wrote:

> Hi Henning
> Thank you for clearing that up, I have 3 problem which you have mentioned
> 2 of them:
> - because of the missing DNS entry your Kamailio would not (re)start
> properly: I tried flag 16  as you mentioned but still dose not work
> 1 sip:asterisk:7060 16
> 1 sip:asterisk2:7060 16
> 1 sip:asterisk3:7060 16
> - because of the missing DNS entry the dispatcher module would not detect
> the asterisk server as "down"
> - because of the missing DNS entry my Asterisks would not (re)start
> properly
> maybe I should try asterisk realtime for the last problem
>
> I can make it work like this:
> Start Kamailio first Then start asterisk containers Then restart astersik
>
> Cheers
> Amir
>
>
> On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt  wrote:
>
>> Hello Amir,
>>
>> what is your issue exactly:
>>
>> - because of the missing DNS entry the dispatcher module would not detect
>> the asterisk server as "down"
>>
>> - because of the missing DNS entry your Kamailio would not (re)start
>> properly
>>
>> You could try with flag 16 to disable DNS resolution at startup in your
>> dispatcher file:
>>
>>
>> https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140
>>
>> Cheers,
>>
>> Henning
>> Am 14.07.19 um 09:33 schrieb Amir:
>>
>> I do not have a DNS server, Docker User-defined networks has it's own
>> built in DNS server,
>> The problem is when I stop a container its DNS record would be deleted
>> and therefore kamailio server could not check server health.
>> I think if I could tell kamailio server that IF you did not find a DNS
>> record it means that a server is down my solution would work.
>>
>> On Sat, Jul 13, 2019 at 10:56 PM Mojtaba  wrote:
>>
>>> Hello,
>>> Did you add SRV record for each server in your DNS server?
>>>
>>> On Sat, Jul 13, 2019 at 6:07 PM Fred Posner  wrote:
>>> >
>>> > The error indicates kamailio can not resolve the location of
>>> asterisk2. Try checking the dns (can you resolve it on the kamailio box?)
>>> or using the IP.
>>> >
>>> > -- Fred
>>> >
>>> >
>>> > On Jul 13, 2019, at 07:09, Amir  wrote:
>>> >
>>> > Hi
>>> > I have created a kamailio container with docker and two asterisk
>>> container
>>> > And this is my dispatcher list:
>>> > 1 sip:asterisk:5060
>>> > 1 sip:asterisk2:5060
>>> > and this is my both asterisk SIP.conf
>>> > [Kamailio]
>>> > host=kamailio
>>> > port=5060
>>> > insecure=invite
>>> > type=friend
>>> > context=from-internal
>>> >
>>> > The problem is that I use User-defined networks which has its own DNS
>>> > when a container starts a dns record would be set
>>> > If I start a kamailio first then start two asterisks the asterisk
>>> works fine
>>> > because the name "kamailio" has been set in docker dns
>>> > but I should restart the kamailio because at startup It could not
>>> resolve astersik dns records
>>> > after the everything works fine but if the any of the asterisk
>>> instances crash/stop kamailio
>>> > can not detect that because a dns record would not be available:
>>> >
>>> > 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su(): could
>>> not resolve hostname: "asterisk2"
>>> > 17(22) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "asterisk2"
>>> > 17(22) ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found
>>> > 17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set(): unable to
>>> ping [sip:asterisk2:5060]
>>> >
>>> >
>>> > It is kind of loop , I think maybe I can fix asterisk problem with
>>> asterisk realtime and
>>> > set the sip.conf in database.
>>> > anyone has any suggestion for this problem?
>>> >
>>> > ___
>>> > Kamailio (SER) - Users Mailing List
>>> > sr-users@lists.kamailio.org
>>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>> >
>>> > ___
>>> > Kamailio (SER) - Users Mailing List
>>> > sr-users@lists.kamailio.org
>>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>>
>>> --
>>> --Mojtaba Esfandiari.S
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Henning Westerholt - https://skalatan.de/blog/
>> Kamailio services - https://skalatan.de/services
>>
>>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread Amir
Hi Henning
Thank you for clearing that up, I have 3 problem which you have mentioned 2
of them:
- because of the missing DNS entry your Kamailio would not (re)start
properly: I tried flag 16  as you mentioned but still dose not work
1 sip:asterisk:7060 16
1 sip:asterisk2:7060 16
1 sip:asterisk3:7060 16
- because of the missing DNS entry the dispatcher module would not detect
the asterisk server as "down"
- because of the missing DNS entry my Asterisks would not (re)start properly
maybe I should try asterisk realtime for the last problem

I can make it work like this:
Start Kamailio first Then start asterisk containers Then restart astersik

Cheers
Amir


On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt  wrote:

> Hello Amir,
>
> what is your issue exactly:
>
> - because of the missing DNS entry the dispatcher module would not detect
> the asterisk server as "down"
>
> - because of the missing DNS entry your Kamailio would not (re)start
> properly
>
> You could try with flag 16 to disable DNS resolution at startup in your
> dispatcher file:
>
>
> https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140
>
> Cheers,
>
> Henning
> Am 14.07.19 um 09:33 schrieb Amir:
>
> I do not have a DNS server, Docker User-defined networks has it's own
> built in DNS server,
> The problem is when I stop a container its DNS record would be deleted and
> therefore kamailio server could not check server health.
> I think if I could tell kamailio server that IF you did not find a DNS
> record it means that a server is down my solution would work.
>
> On Sat, Jul 13, 2019 at 10:56 PM Mojtaba  wrote:
>
>> Hello,
>> Did you add SRV record for each server in your DNS server?
>>
>> On Sat, Jul 13, 2019 at 6:07 PM Fred Posner  wrote:
>> >
>> > The error indicates kamailio can not resolve the location of asterisk2.
>> Try checking the dns (can you resolve it on the kamailio box?) or using the
>> IP.
>> >
>> > -- Fred
>> >
>> >
>> > On Jul 13, 2019, at 07:09, Amir  wrote:
>> >
>> > Hi
>> > I have created a kamailio container with docker and two asterisk
>> container
>> > And this is my dispatcher list:
>> > 1 sip:asterisk:5060
>> > 1 sip:asterisk2:5060
>> > and this is my both asterisk SIP.conf
>> > [Kamailio]
>> > host=kamailio
>> > port=5060
>> > insecure=invite
>> > type=friend
>> > context=from-internal
>> >
>> > The problem is that I use User-defined networks which has its own DNS
>> > when a container starts a dns record would be set
>> > If I start a kamailio first then start two asterisks the asterisk works
>> fine
>> > because the name "kamailio" has been set in docker dns
>> > but I should restart the kamailio because at startup It could not
>> resolve astersik dns records
>> > after the everything works fine but if the any of the asterisk
>> instances crash/stop kamailio
>> > can not detect that because a dns record would not be available:
>> >
>> > 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su(): could
>> not resolve hostname: "asterisk2"
>> > 17(22) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "asterisk2"
>> > 17(22) ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found
>> > 17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set(): unable to
>> ping [sip:asterisk2:5060]
>> >
>> >
>> > It is kind of loop , I think maybe I can fix asterisk problem with
>> asterisk realtime and
>> > set the sip.conf in database.
>> > anyone has any suggestion for this problem?
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>> --
>> --Mojtaba Esfandiari.S
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://skalatan.de/services
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread Henning Westerholt
Hello Amir,

what is your issue exactly:

- because of the missing DNS entry the dispatcher module would not detect the 
asterisk server as "down"

- because of the missing DNS entry your Kamailio would not (re)start properly

You could try with flag 16 to disable DNS resolution at startup in your 
dispatcher file:

https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140

Cheers,

Henning

Am 14.07.19 um 09:33 schrieb Amir:
I do not have a DNS server, Docker User-defined networks has it's own built in 
DNS server,
The problem is when I stop a container its DNS record would be deleted and 
therefore kamailio server could not check server health.
I think if I could tell kamailio server that IF you did not find a DNS record 
it means that a server is down my solution would work.

On Sat, Jul 13, 2019 at 10:56 PM Mojtaba 
mailto:mes...@gmail.com>> wrote:
Hello,
Did you add SRV record for each server in your DNS server?

On Sat, Jul 13, 2019 at 6:07 PM Fred Posner 
mailto:f...@palner.com>> wrote:
>
> The error indicates kamailio can not resolve the location of asterisk2. Try 
> checking the dns (can you resolve it on the kamailio box?) or using the IP.
>
> -- Fred
>
>
> On Jul 13, 2019, at 07:09, Amir 
> mailto:gheshla...@gmail.com>> wrote:
>
> Hi
> I have created a kamailio container with docker and two asterisk container
> And this is my dispatcher list:
> 1 sip:asterisk:5060
> 1 sip:asterisk2:5060
> and this is my both asterisk SIP.conf
> [Kamailio]
> host=kamailio
> port=5060
> insecure=invite
> type=friend
> context=from-internal
>
> The problem is that I use User-defined networks which has its own DNS
> when a container starts a dns record would be set
> If I start a kamailio first then start two asterisks the asterisk works fine
> because the name "kamailio" has been set in docker dns
> but I should restart the kamailio because at startup It could not resolve 
> astersik dns records
> after the everything works fine but if the any of the asterisk instances 
> crash/stop kamailio
> can not detect that because a dns record would not be available:
>
> 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su(): could not 
> resolve hostname: "asterisk2"
> 17(22) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "asterisk2"
> 17(22) ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found
> 17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set(): unable to ping 
> [sip:asterisk2:5060]
>
>
> It is kind of loop , I think maybe I can fix asterisk problem with asterisk 
> realtime and
> set the sip.conf in database.
> anyone has any suggestion for this problem?
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



--
--Mojtaba Esfandiari.S

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio as ICSCF connection with FHoss

2019-07-14 Thread Henning Westerholt
Hello Mojtaba,

thank you. If there is something that should be added to the kamailio.cfg for 
this implementation (maybe some comments) just open a pull request.

Cheers,

Henning

Am 14.07.19 um 10:28 schrieb Mojtaba:
Hello Henning,
According the 3GPP standards, the IMPU template would be started with '+', for 
this reason in icscf, we have to add '+' to $rU, But in FHOSS the is not any 
IMPU with '+'  prefix as default. There is two way to solve this issue:
1) Add some new IMPU/IMPI according the 3GPP standards. (Be notice that IMPU 
would be started with '+' or ' tel).
2) Have some changes in Kamailio routing block to escape some rules.
The is no needed to have some changes in ims_icscf module.

With Best Regards.Mojtaba

On Sun, Jul 14, 2019 at 12:38 AM Henning Westerholt 
mailto:h...@skalatan.de>> wrote:
Hello Mojtaba,

Let us wait for more details from the reporter before coming to a conclusion. 
Without complete knowledge about the scenario there is always some guessing 
involved.

Cheers,

Henning

-Original Message-
From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Mojtaba
Sent: Saturday, July 13, 2019 8:36 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>; 
maryam.baghd...@gmail.com
Subject: Re: [SR-Users] kamailio as ICSCF connection with FHoss

Hello Mariam,
It is worse way that you made choice. There is no needed to change any things 
in source code.
Just dive to kamailio.cfg file and remove "+" prefix  from $rU (IMPU) . It is 
very straightforward.
WIth Best Regards. Mojtaba

On Sat, Jul 13, 2019 at 2:55 PM Maryam Baghdadi 
mailto:maryam.baghd...@gmail.com>> wrote:
>
> Thank you for your help,
> I resolved my problem , there was a '+' in public_identity that isn't shown 
> in pcap file and just by printing value public_identity in 
> I_perform_location_information_request() recognized .
> I replaced  public_identity = cscf_get_public_identity_from_requri(msg) with  
> cscf_get_to_uri(msg, _identity) then recompiled ims_icscf module and 
> my problem resolved .
>
>
>
> On Wed, Jul 10, 2019 at 3:07 PM Mojtaba 
> mailto:mes...@gmail.com>> wrote:
>>
>> Hello,
>> of course not, Are you sure the IMPI/IMPU in LRI/LRA message there
>> are exist exactly in HSS?
>> Or may they are changed with some prefixes like "tel uri" or "+"
>> With Regards. Mojtaba
>>
>> On Wed, Jul 10, 2019 at 2:05 PM Henning Westerholt 
>> mailto:h...@skalatan.de>> wrote:
>> >
>> > Hello Maryam,
>> >
>> >
>> >
>> > I am not an expert on the FHoss, but just some ideas how to investigate it 
>> > further:
>> >
>> >
>> >
>> > Do you get some error message in FHoss?
>> > Can you test with some other tool (maybe with a test script) that the 
>> > FHoss works ok generally?
>> > Any error message from ICSCF module in the Kamailio logging?
>> >
>> >
>> >
>> > Cheers,
>> >
>> >
>> >
>> > Henning
>> >
>> >
>> >
>> > --
>> >
>> > Henning Westerholt - https://skalatan.de/blog/
>> >
>> > Kamailio services - https://skalatan.de/services
>> >
>> >
>> >
>> > From: sr-users 
>> > mailto:sr-users-boun...@lists.kamailio.org>>
>> >  On Behalf Of
>> > Maryam Baghdadi
>> > Sent: Tuesday, July 9, 2019 10:07 AM
>> > To: Kamailio (SER) - Users Mailing List
>> > mailto:sr-users@lists.kamailio.org>>
>> > Subject: [SR-Users] kamailio as ICSCF connection with FHoss
>> >
>> >
>> >
>> > hello,
>> >
>> >
>> >
>> > I use Kamailio as my Icscf in IMS network .
>> >
>> > after receiving Invite Request from SCSCF to ICSCF‌, a LIR request sent 
>> > from ICSCF to FHoss. User_Unknown response received in all states. I 
>> > checked every thing carefully , users are registered and  defined in HSS 
>> > and every configuration done . What's wrong? is it possible that icscf has 
>> > problem? or it can be FHoss bug?


--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio as ICSCF connection with FHoss

2019-07-14 Thread Henning Westerholt
Hello Maryam,

don't worry. Good that you found it and that is sorted out in the end.

Cheers,

Henning

Am 14.07.19 um 09:03 schrieb Maryam Baghdadi:
Hello Henning,

I checked every thing in my scenario again and I think Mojtaba was right.
I modified icscf.cfg file and changed $ru before calling 
I_perform_location_information_request() :

route[initial_request]
{
  $avp(prefix)="+";
 $ru= $(ru{s.rm,$avp(prefix)});
 I_perform_location_information_request("LIR_REPLY", "0");
}
and after this without changing ims_icscf module problem solved.
 but I attached log file which caused I made mistake, some places URI have '+' 
prefix and some places it doesn't have for example output of 
cscf_get_public_identity_from_requri(msg) function exactly after extraction 
public_identity doesn't contains '+' prefix but in  
I_perform_location_information_request() and after calling 
cscf_get_public_identity_from_requri(msg) output of public_identity contains 
'+' prefix.
Anyway no need to module modification and source codes , just adding above 
parts in configuration file is enough.
I apologize and thanks all,

On Sun, Jul 14, 2019 at 12:38 AM Henning Westerholt 
mailto:h...@skalatan.de>> wrote:
Hello Mojtaba,

Let us wait for more details from the reporter before coming to a conclusion. 
Without complete knowledge about the scenario there is always some guessing 
involved.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services

-Original Message-
From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Mojtaba
Sent: Saturday, July 13, 2019 8:36 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>; 
maryam.baghd...@gmail.com
Subject: Re: [SR-Users] kamailio as ICSCF connection with FHoss

Hello Mariam,
It is worse way that you made choice. There is no needed to change any things 
in source code.
Just dive to kamailio.cfg file and remove "+" prefix  from $rU (IMPU) . It is 
very straightforward.
WIth Best Regards. Mojtaba

On Sat, Jul 13, 2019 at 2:55 PM Maryam Baghdadi 
mailto:maryam.baghd...@gmail.com>> wrote:
>
> Thank you for your help,
> I resolved my problem , there was a '+' in public_identity that isn't shown 
> in pcap file and just by printing value public_identity in 
> I_perform_location_information_request() recognized .
> I replaced  public_identity = cscf_get_public_identity_from_requri(msg) with  
> cscf_get_to_uri(msg, _identity) then recompiled ims_icscf module and 
> my problem resolved .
>
>
>
> On Wed, Jul 10, 2019 at 3:07 PM Mojtaba 
> mailto:mes...@gmail.com>> wrote:
>>
>> Hello,
>> of course not, Are you sure the IMPI/IMPU in LRI/LRA message there
>> are exist exactly in HSS?
>> Or may they are changed with some prefixes like "tel uri" or "+"
>> With Regards. Mojtaba
>>
>> On Wed, Jul 10, 2019 at 2:05 PM Henning Westerholt 
>> mailto:h...@skalatan.de>> wrote:
>> >
>> > Hello Maryam,
>> >
>> >
>> >
>> > I am not an expert on the FHoss, but just some ideas how to investigate it 
>> > further:
>> >
>> >
>> >
>> > Do you get some error message in FHoss?
>> > Can you test with some other tool (maybe with a test script) that the 
>> > FHoss works ok generally?
>> > Any error message from ICSCF module in the Kamailio logging?
>> >
>> >
>> >
>> > Cheers,
>> >
>> >
>> >
>> > Henning
>> >
>> >
>> >
>> > --
>> >
>> > Henning Westerholt - https://skalatan.de/blog/
>> >
>> > Kamailio services - https://skalatan.de/services
>> >
>> >
>> >
>> > From: sr-users 
>> > mailto:sr-users-boun...@lists.kamailio.org>>
>> >  On Behalf Of
>> > Maryam Baghdadi
>> > Sent: Tuesday, July 9, 2019 10:07 AM
>> > To: Kamailio (SER) - Users Mailing List
>> > mailto:sr-users@lists.kamailio.org>>
>> > Subject: [SR-Users] kamailio as ICSCF connection with FHoss
>> >
>> >
>> >
>> > hello,
>> >
>> >
>> >
>> > I use Kamailio as my Icscf in IMS network .
>> >
>> > after receiving Invite Request from SCSCF to ICSCF‌, a LIR request sent 
>> > from ICSCF to FHoss. User_Unknown response received in all states. I 
>> > checked every thing carefully , users are registered and  defined in HSS 
>> > and every configuration done . What's wrong? is it possible that icscf has 
>> > problem? or it can be FHoss bug?
>> >
>> >
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List 
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>> --
>> --Mojtaba Esfandiari.S
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 

Re: [SR-Users] kamailio as ICSCF connection with FHoss

2019-07-14 Thread Mojtaba
Hello Henning,
According the 3GPP standards, the IMPU template would be started with '+',
for this reason in icscf, we have to add '+' to $rU, But in FHOSS the is
not any IMPU with '+'  prefix as default. There is two way to solve this
issue:
1) Add some new IMPU/IMPI according the 3GPP standards. (Be notice that
IMPU would be started with '+' or ' tel).
2) Have some changes in Kamailio routing block to escape some rules.
The is no needed to have some changes in ims_icscf module.

With Best Regards.Mojtaba

On Sun, Jul 14, 2019 at 12:38 AM Henning Westerholt  wrote:

> Hello Mojtaba,
>
> Let us wait for more details from the reporter before coming to a
> conclusion. Without complete knowledge about the scenario there is always
> some guessing involved.
>
> Cheers,
>
> Henning
>
> --
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://skalatan.de/services
>
> -Original Message-
> From: sr-users  On Behalf Of Mojtaba
> Sent: Saturday, July 13, 2019 8:36 PM
> To: Kamailio (SER) - Users Mailing List ;
> maryam.baghd...@gmail.com
> Subject: Re: [SR-Users] kamailio as ICSCF connection with FHoss
>
> Hello Mariam,
> It is worse way that you made choice. There is no needed to change any
> things in source code.
> Just dive to kamailio.cfg file and remove "+" prefix  from $rU (IMPU) . It
> is very straightforward.
> WIth Best Regards. Mojtaba
>
> On Sat, Jul 13, 2019 at 2:55 PM Maryam Baghdadi 
> wrote:
> >
> > Thank you for your help,
> > I resolved my problem , there was a '+' in public_identity that isn't
> shown in pcap file and just by printing value public_identity in
> I_perform_location_information_request() recognized .
> > I replaced  public_identity = cscf_get_public_identity_from_requri(msg)
> with  cscf_get_to_uri(msg, _identity) then recompiled ims_icscf
> module and my problem resolved .
> >
> >
> >
> > On Wed, Jul 10, 2019 at 3:07 PM Mojtaba  wrote:
> >>
> >> Hello,
> >> of course not, Are you sure the IMPI/IMPU in LRI/LRA message there
> >> are exist exactly in HSS?
> >> Or may they are changed with some prefixes like "tel uri" or "+"
> >> With Regards. Mojtaba
> >>
> >> On Wed, Jul 10, 2019 at 2:05 PM Henning Westerholt 
> wrote:
> >> >
> >> > Hello Maryam,
> >> >
> >> >
> >> >
> >> > I am not an expert on the FHoss, but just some ideas how to
> investigate it further:
> >> >
> >> >
> >> >
> >> > Do you get some error message in FHoss?
> >> > Can you test with some other tool (maybe with a test script) that the
> FHoss works ok generally?
> >> > Any error message from ICSCF module in the Kamailio logging?
> >> >
> >> >
> >> >
> >> > Cheers,
> >> >
> >> >
> >> >
> >> > Henning
> >> >
> >> >
> >> >
> >> > --
> >> >
> >> > Henning Westerholt - https://skalatan.de/blog/
> >> >
> >> > Kamailio services - https://skalatan.de/services
> >> >
> >> >
> >> >
> >> > From: sr-users  On Behalf Of
> >> > Maryam Baghdadi
> >> > Sent: Tuesday, July 9, 2019 10:07 AM
> >> > To: Kamailio (SER) - Users Mailing List
> >> > 
> >> > Subject: [SR-Users] kamailio as ICSCF connection with FHoss
> >> >
> >> >
> >> >
> >> > hello,
> >> >
> >> >
> >> >
> >> > I use Kamailio as my Icscf in IMS network .
> >> >
> >> > after receiving Invite Request from SCSCF to ICSCF‌, a LIR request
> sent from ICSCF to FHoss. User_Unknown response received in all states. I
> checked every thing carefully , users are registered and  defined in HSS
> and every configuration done . What's wrong? is it possible that icscf has
> problem? or it can be FHoss bug?
> >> >
> >> >
> >> >
> >> > ___
> >> > Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org
> >> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >>
> >>
> >>
> >> --
> >> --Mojtaba Esfandiari.S
> >>
> >> ___
> >> Kamailio (SER) - Users Mailing List
> >> sr-users@lists.kamailio.org
> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> --
> --Mojtaba Esfandiari.S
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
--Mojtaba Esfandiari.S
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio as ICSCF connection with FHoss

2019-07-14 Thread Mojtaba
Yes, In the request that you make, there isn't any '+', but when the
request come to icscf, the '+' is added to request. After that the LIR
message is issued.
If you have look on kamailio.cfg in icscf node, the code is appear:
# -  request routing logic ---
# main routing logic

route{
*.*
*.*
*.*


*if !($rU =~ "\+.*") {prefix("+");*
*}*
*.*
*.*
*.*
The '+' is added in above code. You just comment those codes to prevent
adding '+' in $rU.
With Best Regards.Mojtaba


On Sat, Jul 13, 2019 at 11:30 PM Mary Honey  wrote:

> No ,
> There isn't any  '+' in request msg . I know what I did
> In the function and after extracting public_identity one of the functions
> unexpectly adds '+' to public_identity
>
>
> On Sat, Jul 13, 2019, 11:08 PM Mojtaba 
>> Hello Henning,
>> I don't think so there is no needed to change any code in ims_icscf
>> module.
>> With Best Regards. Mojtaba
>>
>> On Sat, Jul 13, 2019 at 3:06 PM Henning Westerholt 
>> wrote:
>> >
>> > Hello Maryam,
>> >
>> > great that you were able to solve it. You mentioned that you need to
>> re-compile the ims_icscf module. Is there in your opinion an error or
>> limitation in this module?
>> >
>> > Cheers,
>> >
>> > Henning
>> >
>> > Am 13.07.19 um 12:24 schrieb Maryam Baghdadi:
>> >
>> > Thank you for your help,
>> > I resolved my problem , there was a '+' in public_identity that isn't
>> shown in pcap file and just by printing value public_identity in
>> I_perform_location_information_request() recognized .
>> > I replaced  public_identity = cscf_get_public_identity_from_requri(msg)
>> with  cscf_get_to_uri(msg, _identity) then recompiled ims_icscf
>> module and my problem resolved .
>> >
>> >
>> >
>> > On Wed, Jul 10, 2019 at 3:07 PM Mojtaba  wrote:
>> >>
>> >> Hello,
>> >> of course not, Are you sure the IMPI/IMPU in LRI/LRA message there are
>> >> exist exactly in HSS?
>> >> Or may they are changed with some prefixes like "tel uri" or "+"
>> >> With Regards. Mojtaba
>> >>
>> >> On Wed, Jul 10, 2019 at 2:05 PM Henning Westerholt 
>> wrote:
>> >> >
>> >> > Hello Maryam,
>> >> >
>> >> >
>> >> >
>> >> > I am not an expert on the FHoss, but just some ideas how to
>> investigate it further:
>> >> >
>> >> >
>> >> >
>> >> > Do you get some error message in FHoss?
>> >> > Can you test with some other tool (maybe with a test script) that
>> the FHoss works ok generally?
>> >> > Any error message from ICSCF module in the Kamailio logging?
>> >> >
>> >> >
>> >> >
>> >> > Cheers,
>> >> >
>> >> >
>> >> >
>> >> > Henning
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> >
>> >> > Henning Westerholt - https://skalatan.de/blog/
>> >> >
>> >> > Kamailio services - https://skalatan.de/services
>> >> >
>> >> >
>> >> >
>> >> > From: sr-users  On Behalf Of
>> Maryam Baghdadi
>> >> > Sent: Tuesday, July 9, 2019 10:07 AM
>> >> > To: Kamailio (SER) - Users Mailing List > >
>> >> > Subject: [SR-Users] kamailio as ICSCF connection with FHoss
>> >> >
>> >> >
>> >> >
>> >> > hello,
>> >> >
>> >> >
>> >> >
>> >> > I use Kamailio as my Icscf in IMS network .
>> >> >
>> >> > after receiving Invite Request from SCSCF to ICSCF‌, a LIR request
>> sent from ICSCF to FHoss. User_Unknown response received in all states. I
>> checked every thing carefully , users are registered and  defined in HSS
>> and every configuration done . What's wrong? is it possible that icscf has
>> problem? or it can be FHoss bug?
>> >> >
>> >> >
>> >> >
>> >> > ___
>> >> > Kamailio (SER) - Users Mailing List
>> >> > sr-users@lists.kamailio.org
>> >> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> >>
>> >>
>> >>
>> >> --
>> >> --Mojtaba Esfandiari.S
>> >>
>> >> ___
>> >> Kamailio (SER) - Users Mailing List
>> >> sr-users@lists.kamailio.org
>> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> >
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> >
>> > --
>> > Henning Westerholt - https://skalatan.de/blog/
>> > Kamailio services - https://skalatan.de/services
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>> --
>> --Mojtaba Esfandiari.S
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
--Mojtaba Esfandiari.S
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org

Re: [SR-Users] Kamailio Asterisk integration with docker DNS Problem

2019-07-14 Thread Amir
I do not have a DNS server, Docker User-defined networks has it's own built
in DNS server,
The problem is when I stop a container its DNS record would be deleted and
therefore kamailio server could not check server health.
I think if I could tell kamailio server that IF you did not find a DNS
record it means that a server is down my solution would work.

On Sat, Jul 13, 2019 at 10:56 PM Mojtaba  wrote:

> Hello,
> Did you add SRV record for each server in your DNS server?
>
> On Sat, Jul 13, 2019 at 6:07 PM Fred Posner  wrote:
> >
> > The error indicates kamailio can not resolve the location of asterisk2.
> Try checking the dns (can you resolve it on the kamailio box?) or using the
> IP.
> >
> > -- Fred
> >
> >
> > On Jul 13, 2019, at 07:09, Amir  wrote:
> >
> > Hi
> > I have created a kamailio container with docker and two asterisk
> container
> > And this is my dispatcher list:
> > 1 sip:asterisk:5060
> > 1 sip:asterisk2:5060
> > and this is my both asterisk SIP.conf
> > [Kamailio]
> > host=kamailio
> > port=5060
> > insecure=invite
> > type=friend
> > context=from-internal
> >
> > The problem is that I use User-defined networks which has its own DNS
> > when a container starts a dns record would be set
> > If I start a kamailio first then start two asterisks the asterisk works
> fine
> > because the name "kamailio" has been set in docker dns
> > but I should restart the kamailio because at startup It could not
> resolve astersik dns records
> > after the everything works fine but if the any of the asterisk instances
> crash/stop kamailio
> > can not detect that because a dns record would not be available:
> >
> > 17(22) ERROR:  [core/resolve.c:1684]: sip_hostport2su(): could not
> resolve hostname: "asterisk2"
> > 17(22) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "asterisk2"
> > 17(22) ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found
> > 17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set(): unable to
> ping [sip:asterisk2:5060]
> >
> >
> > It is kind of loop , I think maybe I can fix asterisk problem with
> asterisk realtime and
> > set the sip.conf in database.
> > anyone has any suggestion for this problem?
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> --
> --Mojtaba Esfandiari.S
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users