Jump to content

Call Flow Patterns


Logicwrath

Recommended Posts

I have a specific need to automatically change the caller id based on the destination number.  A specific customer has 7 or 8 numbers in multiple area codes and likes to change the caller id based on which area code they are calling.

I have been creating call flows using postman to try and solve this because patterns and the set_cid module are not available in Monster.

The problem is that my pattern is not matching/working.  If I create the exact same call flow using numbers, the set_cid module works.  If I switch to patterns, it always chooses the default caller id.

Here is the JSON I am using to create the call flow:  http://pastebin.com/91QSUnDf

I have tried 3-4 different patterns.  As soon as I use numbers instead, the call flow functions correctly.  It appears that something else is matching first like no_match.  I assume this because I can see different recording URLs in the call logs.

If I post the pattern with a * in front like ^\\*(1586\d{7})$ the correct call flow will get matched but the call is sent with the * and fails.

Can anyone help me understand what I am doing wrong?
Link to comment
Share on other sites

  • Administrators
So to follow up on the Wiki, we discussed this yesterday.

Github has a Wiki. It also lets you fork it so you can always have a copy and never fear where it goes. Plus you can download it offline.

So we're going to use our Kazoo Wiki and I'm working on laying out sections I think you guys want filled there. I'll keep you posted. This solution is cool because you can edit inline on the webpage, or download it and edit offline in your favorite editor. And we can track revisions.

Will this work?
Link to comment
Share on other sites

I just meant from the community searchbox from this website.

---

As far as my solution for dynamic outbound caller id.  I can post it here for now.

Create a call flow using Postman and the API.  Here is an example of the call flow data:

http://pastebin.com/js3uba9q

Edit the following php file with the caller id's you want to match.

http://pastebin.com/hAsdSQqU

You can set a logging variable to dump the headers and the other important variables to a text file.

The call flow dialing pattern should match anything with a * and 10 or 11 digits.  *15558675309

So instead of pressing 1 for country code people can do * and use the dynamic matching pivot script.  I have not put this into production yet.  I stopped looking at it when it worked a few times.
Link to comment
Share on other sites

  • 3 weeks later...
I wanted to add that in order for this to work you cannot set a company caller id in Smart PBX.  I am not sure if that is by design or not.  I would prefer to have this override the main company caller ID.

This also requires per minute calling as it will not make use of the trunk limits.  I am also not sure if this is by design.  In my use cases I would prefer to make use of trunk limits.  My plans specify trunk limits.

custom_channel_vars.reseller_billing
per_minute

You should also specify a default case match in the pivot file to specify your default caller id on on-matches.
Link to comment
Share on other sites

It's worth mentioning, that you can create a dial plan in Bria that will automatically prefix the number with a * before it sends.

---

I am however, having an issue with this again.  If I place a call using this pivot call flow the call will end exactly at 20 seconds.

I placed a pivot call to myself and used wireshark to better see what types of SIP messages were going back and forth.  The picture on the left is my soft phone receiving the call and the image on the right is my soft phone placing the call.

http://prntscr.com/aozyn6

You can also see an example of the TWIML response that gets generated by the Pivot script here:

http://pastebin.com/yTUeiR6j

I assume other people successfully use pivot to dial calls, the response from the pivot script is super basic, what am I missing here?

I tried 2 different soft phones Bria and Ninja with the same behaviour.  Session timers are disabled in Bria and so are inactivity timers.
Link to comment
Share on other sites

It gets worse when you consider that you have to leave the company caller id field unset to use the pivot script in the first place.  So if you want to let the users decide when to use the dynamic outbound caller id option, they will not have a caller id set when they do not use the pivot script.

I may have to set a company caller id and disable the pivot script until I figure out what is going on.

Does this sound like a bug?

I could avoid pivot all together if we had regex patterns in call flows and there was a set caller id object.
Link to comment
Share on other sites

×
×
  • Create New...